Skip to content

Commit

Permalink
Add PHP 8.2 to CI and update PHP dependencies
Browse files Browse the repository at this point in the history
Split out the Phan command from the Composer test script, so that
it can be run as a separate CI step (and excluded for PH 8.2).

Bug: T332611
  • Loading branch information
samwilson authored Sep 7, 2023
1 parent 92062af commit b139f0c
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 133 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@ jobs:

env:
APP_ENV: test

strategy:
matrix:
php: [ '7.3', '7.4', '8.0', '8.1' ]
runPhan: [ true ]
include:
- php: '8.2'
runPhan: false

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -49,11 +53,15 @@ jobs:
run: |
composer install
npm ci
- name: Test
run: |
composer test
composer test-common
npm run test
npm run build
git status
git status | grep "nothing to commit, working tree clean"
- name: Test (Phan)
if: ${{ matrix.runPhan }}
run: composer phan
10 changes: 8 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "project",
"license": "GPL-3.0-or-later",
"require": {
"php": ">=7.2.5",
"php": ">=7.3",
"ext-bcmath": "*",
"ext-ctype": "*",
"ext-gd": "*",
Expand Down Expand Up @@ -77,15 +77,21 @@
"@check-tesseract"
],
"test": [
"@test-common",
"@phan"
],
"test-common": [
"composer validate",
"phpcs -s -p .",
"./bin/console lint:twig ./templates",
"./bin/console lint:yaml ./config",
"minus-x check .",
"phan --allow-polyfill-parser --long-progress-bar",
"@check-tesseract",
"./bin/phpunit"
],
"phan": [
"phan --allow-polyfill-parser --long-progress-bar"
],
"fix": "phpcbf"
},
"conflict": {
Expand Down
Loading

0 comments on commit b139f0c

Please sign in to comment.