Run CI tests against PHP 8.3, 8.4 and 8.5
Move the test steps into a matrix job and keep a aggregating `test` job so the branch protection check name stays stable. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bba877999f
commit
5a3880c6e9
2 files changed
+24
-3
No files matched your search
+21
-2
@@ -32,15 +32,21 @@ on:
|
||||
branches: ['**']
|
||||
|
||||
jobs:
|
||||
test:
|
||||
# Matrix over the supported PHP versions.
|
||||
phpunit:
|
||||
name: PHP ${{ matrix.php }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php: ['8.3', '8.4', '8.5']
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.5'
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: mbstring, intl, pdo_sqlite, sqlite3
|
||||
coverage: none
|
||||
|
||||
@@ -53,6 +59,19 @@ jobs:
|
||||
- name: Coding standard
|
||||
run: vendor/bin/phpcs --warning-severity=0
|
||||
|
||||
# Stable check name required by the branch protection of main: green only if all PHP versions are green.
|
||||
test:
|
||||
needs: phpunit
|
||||
if: always()
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: All PHP versions passed
|
||||
run: |
|
||||
if [ "${{ needs.phpunit.result }}" != "success" ]; then
|
||||
echo "Matrix result: ${{ needs.phpunit.result }}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
deploy:
|
||||
needs: test
|
||||
# Deactivated until the repository variable DEPLOY_ENABLED is "true".
|
||||
|
||||
Reference in new issue
Block a user