ci: combine composer, format, and analyze jobs into single lint job

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
loks0n
2026-04-09 15:15:08 +01:00
parent 4ff10dcacc
commit f2f3ff59be
2 changed files with 11 additions and 45 deletions
+10 -44
View File
@@ -83,12 +83,14 @@ jobs:
sarif_file: 'trivy-fs-results.sarif'
category: 'trivy-source'
composer:
name: Checks / Composer
lint:
name: Checks / Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -108,48 +110,6 @@ jobs:
COMPOSER_NO_AUDIT: 0
run: composer audit
format:
name: Checks / Format
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 2
- run: git checkout HEAD^2
if: github.event_name == 'pull_request'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: composer:v2
coverage: none
- name: Install dependencies
run: composer install --prefer-dist --no-progress --ignore-platform-reqs
- name: Run Linter
run: composer lint
analyze:
name: Checks / Analyze
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: composer:v2
coverage: none
- name: Install dependencies
run: composer install --prefer-dist --no-progress --ignore-platform-reqs
- name: Cache PHPStan result cache
uses: actions/cache@v4
with:
@@ -161,6 +121,12 @@ jobs:
- name: Run PHPStan
run: composer analyze -- --no-progress
- run: git checkout HEAD^2
if: github.event_name == 'pull_request'
- name: Run Pint
run: composer format:check
specs:
name: Checks / Specs
runs-on: ubuntu-latest
+1 -1
View File
@@ -11,7 +11,7 @@
],
"scripts": {
"test": "vendor/bin/phpunit",
"lint": "vendor/bin/pint --test --config pint.json",
"format:check": "vendor/bin/pint --test --config pint.json",
"format": "vendor/bin/pint --config pint.json",
"analyze": "./vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=1G",
"bench": "vendor/bin/phpbench run --report=benchmark",