mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 23:05:46 +00:00
test(arch): layering + cycle guard (dependency-cruiser) with current-violation allowlist
Encode the feature-folder layering contract as a CI gate: lib is the floor, store/ui must not import features/app, cross-feature only via the barrel, no cycles. dependency-cruiser resolves the @/ alias via tsconfig; tests excluded. Land as a ratchet: the 738 current violations are seeded into .dependency-cruiser-known-violations.json and ignored via --ignore-known, so HEAD is green and any NEW violation fails CI. Regenerate the baseline as the drain removes an exception; the count is the tracked residual debt. Wired via `npm run dep:check` into a new dependency-cruiser job in eslint.yml and the ci-ok required-check aggregate.
This commit is contained in:
@@ -11,6 +11,8 @@ on:
|
||||
- 'vite.config.ts'
|
||||
- 'tsconfig.json'
|
||||
- 'eslint.config.mjs'
|
||||
- '.dependency-cruiser.cjs'
|
||||
- '.dependency-cruiser-known-violations.json'
|
||||
- '.github/workflows/eslint.yml'
|
||||
- '.github/frontend-hot-path-files.txt'
|
||||
- 'scripts/check-frontend-hot-path-coverage.sh'
|
||||
@@ -25,6 +27,8 @@ on:
|
||||
- 'vite.config.ts'
|
||||
- 'tsconfig.json'
|
||||
- 'eslint.config.mjs'
|
||||
- '.dependency-cruiser.cjs'
|
||||
- '.dependency-cruiser-known-violations.json'
|
||||
- '.github/workflows/eslint.yml'
|
||||
- '.github/frontend-hot-path-files.txt'
|
||||
- 'scripts/check-frontend-hot-path-coverage.sh'
|
||||
@@ -47,3 +51,16 @@ jobs:
|
||||
- run: npm ci
|
||||
- name: eslint
|
||||
run: npm run lint
|
||||
|
||||
dependency-cruiser:
|
||||
name: dependency-cruiser
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- name: layering + cycle guard
|
||||
run: npm run dep:check
|
||||
|
||||
Reference in New Issue
Block a user