test.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: tests
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - feature/tests
  7. - feature/feature-tests
  8. pull_request:
  9. schedule:
  10. - cron: '0 0 * * *'
  11. jobs:
  12. linux_tests:
  13. runs-on: ubuntu-22.04
  14. strategy:
  15. fail-fast: false
  16. matrix:
  17. os: [ubuntu-latest, macos-latest, windows-latest]
  18. php: ["8.1", "8.2", "8.3", "8.4"]
  19. stability: [prefer-lowest, prefer-stable]
  20. name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
  21. steps:
  22. - name: Checkout code
  23. uses: actions/checkout@v4
  24. - name: Setup PHP
  25. uses: shivammathur/setup-php@v2
  26. with:
  27. php-version: ${{ matrix.php }}
  28. extensions: json, posix, pcntl
  29. ini-values: error_reporting=E_ALL
  30. tools: composer:v2
  31. coverage: xdebug
  32. - name: Install dependencies
  33. uses: nick-fields/retry@v3
  34. with:
  35. timeout_minutes: 5
  36. max_attempts: 5
  37. command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress --ansi
  38. - name: Static analysis
  39. run: composer analyze
  40. - name: Execute tests
  41. run: composer test