GitHub pipeline, PHP 8.4 support #4
Workflow file for this run
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: PHP Tests | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "**" ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: ['8.1', '8.2', '8.3', '8.4'] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: mbstring, xml, json, xdebug, curl | |
coverage: pcov | |
tools: composer:v2 | |
- name: Adjust composer dependencies for older PHP versions | |
run: php scripts/adjust-deps-for-older-php-versions.php | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php-${{ matrix.php-version }}- | |
- name: Run all test suites | |
run: composer run-script test-all |