tests.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. name: Tests
  2. on:
  3. push:
  4. pull_request:
  5. jobs:
  6. tests:
  7. name: PHP ${{ matrix.php }}; Symfony ${{ matrix.symfony }}
  8. runs-on: ubuntu-20.04
  9. strategy:
  10. matrix:
  11. php: ['7.3', '7.4', '8.0']
  12. symfony: ['4', '5', '6']
  13. exclude:
  14. - php: '7.3'
  15. symfony: '6'
  16. - php: '7.4'
  17. symfony: '6'
  18. steps:
  19. - name: Checkout Code
  20. uses: actions/checkout@v2
  21. - name: Setup PHP
  22. uses: shivammathur/setup-php@v2
  23. with:
  24. php-version: ${{ matrix.php }}
  25. tools: composer:v2
  26. coverage: none
  27. - name: Setup Problem Matchers
  28. run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
  29. - name: Select Symfony 4
  30. uses: nick-invision/retry@v1
  31. with:
  32. timeout_minutes: 5
  33. max_attempts: 5
  34. command: composer require "symfony/filesystem:^4.0" "symfony/process:^4.0" "symfony/var-dumper:^4.0" --dev --no-update --no-interaction
  35. if: "matrix.symfony == '4'"
  36. - name: Select Symfony 5
  37. uses: nick-invision/retry@v1
  38. with:
  39. timeout_minutes: 5
  40. max_attempts: 5
  41. command: composer require "symfony/filesystem:^5.0" "symfony/process:^5.0" "symfony/var-dumper:^5.0" --dev --no-update --no-interaction
  42. if: "matrix.symfony == '5'"
  43. - name: Select Symfony 6
  44. uses: nick-invision/retry@v1
  45. with:
  46. timeout_minutes: 5
  47. max_attempts: 5
  48. command: composer require "symfony/filesystem:^6.0@dev" "symfony/process:^6.0@dev" "symfony/var-dumper:^6.0@dev" --dev --no-update --no-interaction
  49. if: "matrix.symfony == '6'"
  50. - name: Install Dependencies
  51. uses: nick-invision/retry@v1
  52. with:
  53. timeout_minutes: 5
  54. max_attempts: 5
  55. command: composer update --no-interaction --no-progress
  56. - name: Execute PHPUnit
  57. run: vendor/bin/phpunit
  58. env:
  59. CHROME_PATH: google-chrome-stable