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: true
  16. matrix:
  17. php: ["8.1", "8.2", "8.3"]
  18. stability: [prefer-lowest, prefer-stable]
  19. name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
  20. steps:
  21. - name: Checkout code
  22. uses: actions/checkout@v3
  23. - name: Setup PHP
  24. uses: shivammathur/setup-php@v2
  25. with:
  26. php-version: ${{ matrix.php }}
  27. extensions: json, posix, pcntl
  28. ini-values: error_reporting=E_ALL
  29. tools: composer:v2
  30. coverage: xdebug
  31. - name: Install dependencies
  32. uses: nick-fields/retry@v2
  33. with:
  34. timeout_minutes: 5
  35. max_attempts: 5
  36. command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
  37. - name: Static analysis
  38. run: composer analyze
  39. - name: Execute tests
  40. run: vendor/bin/pest --coverage --colors=always