Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Quality
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: quality-${{ github.ref }}
cancel-in-progress: true
jobs:
contract:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: "24.19.0"
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "24"
- run: npm ci
- run: npm --prefix tools/quality ci
- run: npm run test:quality
- run: node tools/quality/run.mjs guards
- run: npm run format:check
- run: npm run lint:static
- run: npm run lint:unused:production
- run: npm run lint:unused:full
- run: npm run lint:duplicates
- run: npm run lint:duplicates:full
- run: node quality/generator/generate.mjs
- run: node quality/generator/verify-negative.mjs
- uses: shivammathur/setup-php@v2
with:
php-version: "8.5.11"
extensions: curl, mbstring
tools: composer:2.8.12
- run: composer install --no-interaction --prefer-dist
- run: find lib -name '*.php' -print0 | xargs -0 -n 1 php -l
- run: php quality/contract-smoke.php
- run: git diff --exit-code -- composer.json composer.lock
- uses: actions/upload-artifact@v4
if: always()
with:
name: quality-evidence
path: |
quality/generator/provenance.json
quality/generator/inventory.json
quality/reports/
quality-required:
if: always()
needs: [contract]
runs-on: ubuntu-24.04
steps:
- env:
RESULTS: ${{ toJSON(needs) }}
run: node -e 'const jobs=JSON.parse(process.env.RESULTS); if(!Object.values(jobs).every(job=>job.result==="success")) process.exit(1)'
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,13 @@ composer.phar

# PHPUnit cache
.phpunit.result.cache

vendor/

node_modules/
quality/reports/

.husky/_/

# Local shared-tool dependency links are never repository content.
tools/quality/node_modules
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node tools/quality/node_modules/lint-staged/bin/lint-staged.js
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.19.0
Loading
Loading