add php 8.4 support #75
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: Run PHPUnit | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: Test (PHP ${{ matrix.php-versions }}) | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: ['8.2', '8.3', '8.4'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: pcov | |
extensions: sockets | |
- name: Get Composer cache dir | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-php-${{ matrix.php-versions }}-composer- | |
- name: Install dependencies | |
run: composer install --no-progress --prefer-dist --optimize-autoloader | |
- name: Run PHPUnit | |
run: vendor/bin/phpunit --coverage-clover=coverage.xml | |
- name: Upload code coverage | |
uses: codecov/codecov-action@v3 | |