tests.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. name: Tests
  2. on:
  3. push:
  4. pull_request:
  5. jobs:
  6. tests_linux:
  7. name: PHP ${{ matrix.php }} Linux
  8. runs-on: ubuntu-22.04
  9. strategy:
  10. matrix:
  11. php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
  12. steps:
  13. - name: Checkout Code
  14. uses: actions/checkout@v4
  15. - name: Setup PHP
  16. uses: shivammathur/setup-php@v2
  17. with:
  18. php-version: ${{ matrix.php }}
  19. tools: composer:snapshot
  20. coverage: none
  21. - name: Setup Problem Matchers
  22. run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
  23. - name: Install PHP Dependencies
  24. uses: nick-invision/retry@v2
  25. with:
  26. timeout_minutes: 5
  27. max_attempts: 5
  28. command: composer update --no-interaction --no-progress
  29. - name: Execute PHPUnit
  30. run: vendor/bin/phpunit
  31. tests_windows:
  32. name: PHP ${{ matrix.php }} Windows
  33. runs-on: windows-2022
  34. strategy:
  35. matrix:
  36. php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
  37. steps:
  38. - name: Configure Git
  39. run: |
  40. git config --global core.autocrlf false
  41. git config --global core.eol lf
  42. - name: Checkout Code
  43. uses: actions/checkout@v4
  44. - name: Setup PHP
  45. uses: shivammathur/setup-php@v2
  46. with:
  47. php-version: ${{ matrix.php }}
  48. tools: composer:snapshot
  49. coverage: none
  50. - name: Setup Problem Matchers
  51. run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
  52. - name: Install PHP Dependencies
  53. uses: nick-invision/retry@v2
  54. with:
  55. timeout_minutes: 5
  56. max_attempts: 5
  57. command: composer update --no-interaction --no-progress
  58. - name: Execute PHPUnit
  59. run: vendor\bin\phpunit.bat