ci.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: PHPUnit
  2. on:
  3. push:
  4. pull_request:
  5. jobs:
  6. tests:
  7. name: Tests
  8. strategy:
  9. matrix:
  10. include:
  11. - php: '7.4'
  12. - php: '8.0'
  13. - php: '8.1'
  14. - php: '8.2'
  15. - php: '8.3'
  16. fail-fast: false
  17. runs-on: ubuntu-latest
  18. steps:
  19. - name: Checkout
  20. uses: actions/checkout@v2
  21. - name: Setup PHP
  22. uses: shivammathur/setup-php@v2
  23. with:
  24. coverage: xdebug
  25. php-version: "${{ matrix.php }}"
  26. - name: Get composer cache directory
  27. id: composer-cache
  28. run: echo "::set-output name=dir::$(composer config cache-files-dir)"
  29. - name: Cache composer dependencies
  30. uses: actions/cache@v1
  31. with:
  32. path: ${{ steps.composer-cache.outputs.dir }}
  33. key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
  34. restore-keys: ${{ runner.os }}-composer-
  35. - name: Install
  36. run: |
  37. composer install -n
  38. if [ "${{ matrix.mode }}" = "low-deps" ]; then composer update --prefer-lowest --prefer-stable -n; fi;
  39. - name: Tests
  40. run: vendor/bin/phpunit