Merge pull request 'Fold PHPCS and PHPStan into one job' (#179) from ci/consolidate-quality-job-and-php-85 into main
CI / Tests (PHP 8.2) (push) Canceled after 1s
CI / Tests (PHP 8.1) (push) Successful in 34s
CI / No Debug Code (push) Successful in 27s
CI / Build Plugin Zip (push) Skipped
CI / Coding Standards & Static Analysis (push) Successful in 10s
CI / Tests (PHP 8.3) (push) Canceled after 15s

Reviewed-on: #179
This commit was merged in pull request #179.
This commit is contained in:
2026-08-20 18:55:16 +00:00
+8 -25
View File
@@ -8,8 +8,13 @@ on:
pull_request: pull_request:
jobs: jobs:
lint: # PHPCS and PHPStan share a job so the two of them draw once on Setup PHP
name: Coding Standards # rather than twice. That step is slow and intermittently fails on 8.3
# (see #178), so every job that can be folded into another is one less
# chance for a run to fall over. They run as separate steps, and PHPCS
# failing stops the job before PHPStan reports.
quality:
name: Coding Standards & Static Analysis
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -32,28 +37,6 @@ jobs:
- name: Run PHPCS - name: Run PHPCS
run: composer cs run: composer cs
static-analysis:
name: PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: composer:v2
- name: Cache Composer packages
uses: actions/cache@v3
with:
path: ~/.composer/cache
key: composer-${{ hashFiles('composer.json') }}
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction
- name: Run PHPStan - name: Run PHPStan
run: composer lint run: composer lint
@@ -108,7 +91,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Only build a shippable artifact once changes land on main, and only # Only build a shippable artifact once changes land on main, and only
# after the quality gates pass. # after the quality gates pass.
needs: [lint, static-analysis, test, no-debug] needs: [quality, test, no-debug]
if: github.event_name == 'push' && github.ref == 'refs/heads/main' if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4