run-tests.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. name: Tests
  2. on:
  3. push:
  4. branches: [master, v4]
  5. pull_request:
  6. jobs:
  7. test:
  8. runs-on: ubuntu-latest
  9. strategy:
  10. matrix:
  11. php:
  12. - '8.2'
  13. - '8.1'
  14. - '8.0'
  15. deps:
  16. - highest
  17. include:
  18. - {php: '8.0', deps: lowest}
  19. - {php: '8.1', deps: dingo}
  20. name: Tests (PHP ${{ matrix.php }} - ${{ matrix.deps }})
  21. steps:
  22. - uses: actions/checkout@v3
  23. - name: Setup PHP ${{ matrix.php }}
  24. uses: shivammathur/setup-php@v2
  25. with:
  26. php-version: ${{ matrix.php }}
  27. extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
  28. coverage: xdebug
  29. - name: Install dependencies
  30. if: ${{ matrix.deps == 'highest' }}
  31. run: composer update
  32. - name: Install dependencies (Dingo)
  33. if: ${{ matrix.deps == 'dingo' }}
  34. run: COMPOSER=composer.dingo.json composer update --prefer-stable
  35. - name: Install dependencies (lowest)
  36. if: ${{ matrix.deps == 'lowest' }}
  37. run: COMPOSER=composer.lowest.json composer update --prefer-stable
  38. - name: Execute tests (Laravel/Lumen)
  39. run: composer test-ci
  40. if: ${{ matrix.deps == 'highest' }}
  41. - name: Execute tests (Lowest)
  42. run: COMPOSER=composer.lowest.json composer test-ci
  43. if: ${{ matrix.deps == 'lowest' }}
  44. - name: Execute tests (Dingo)
  45. run: COMPOSER=composer.dingo.json composer test-ci
  46. if: ${{ matrix.deps == 'dingo' }}