run-tests.yml 1.5 KB

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