tests.yml 910 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: tests
  2. on:
  3. push:
  4. branches: [ 2.x, master ]
  5. pull_request:
  6. branches: [ 2.x, master ]
  7. jobs:
  8. tests:
  9. strategy:
  10. matrix:
  11. php-versions: ['7.3', '7.4', '8.0', '8.1']
  12. runs-on: ubuntu-latest
  13. steps:
  14. - name: Checkout
  15. uses: actions/checkout@v2
  16. - name: Setup PHP
  17. uses: shivammathur/setup-php@v2
  18. with:
  19. php-version: ${{ matrix.php-versions }}
  20. - name: Cache Composer packages
  21. id: composer-cache
  22. uses: actions/cache@v2
  23. with:
  24. path: vendor
  25. key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
  26. restore-keys: |
  27. ${{ runner.os }}-php-
  28. - name: Install dependencies
  29. uses: php-actions/composer@v6
  30. with:
  31. version: 2
  32. php_version: ${{ matrix.php-versions }}
  33. - name: Run test suite
  34. run: vendor/bin/phpunit