build.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. name: Build
  2. on:
  3. push:
  4. branches: [master]
  5. pull_request:
  6. release:
  7. types: [created]
  8. jobs:
  9. tests:
  10. runs-on: ubuntu-latest
  11. name: Build and test
  12. strategy:
  13. fail-fast: false
  14. matrix:
  15. php: [7.2, 7.3, 7.4, 8.0]
  16. composer-flags: [ "" ]
  17. symfony-version: [ "" ]
  18. include:
  19. - php: 7.2
  20. symfony-version: '3.*'
  21. - php: 7.3
  22. symfony-version: '4.*'
  23. - php: 7.4
  24. symfony-version: '5.*'
  25. - php: 8.0
  26. symfony-version: '5.*'
  27. steps:
  28. - uses: actions/checkout@v2
  29. - name: Setup PHP
  30. uses: shivammathur/setup-php@v2
  31. with:
  32. php-version: "${{ matrix.php }}"
  33. coverage: none
  34. - name: Update Symfony version
  35. if: matrix.symfony-version != ''
  36. run: composer require --no-update "symfony/symfony:${{ matrix.symfony-version }}"
  37. - name: Install dependencies
  38. run: composer update ${{ matrix.composer-flags }}
  39. - name: Run tests (phpunit)
  40. run: ./vendor/bin/phpunit