test.yml 1.1 KB

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