update github actions/checkout to v4 #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
push: | |
branches: | |
- 2.x | |
pull_request: | |
branches: | |
- master | |
jobs: | |
php: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: [7.4, 8.0, 8.1] | |
dependency-version: [prefer-lowest, prefer-stable] | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v4 | |
- name: setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: xdebug | |
# - name: do some magic Composer cache | |
# id: composer-cache | |
# run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
# - uses: actions/cache@v2 | |
# with: | |
# path: ${{ steps.composer-cache.outputs.dir }} | |
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
# restore-keys: ${{ runner.os }}-composer- | |
- name: install dependencies | |
run: composer update --${{ matrix.dependency-version }} | |
- name: run tests | |
# run: php vendor/bin/phpunit --coverage-clover=coverage.clover | |
run: php vendor/bin/phpunit | |
# - name: upload code coverage | |
# run: php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover | |