test.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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]
  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. # command: composer install --prefer-dist --no-interaction --no-progress
  38. - name: Execute tests
  39. run: vendor/bin/pest --coverage