mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 18:41:08 +02:00
chore(audit): module complexity reports + workbench map
Adds four audit scripts (module health, inter-module coupling, per-function cognitive complexity, D3 treemap) with generated reports under docs/ and an iframe-embedded workbench app at /admin/complexity. Reports regenerate weekly via the module-health GitHub Action. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b857063120
commit
7c1c6cd54c
12 changed files with 1453 additions and 0 deletions
44
.github/workflows/module-health.yml
vendored
Normal file
44
.github/workflows/module-health.yml
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
name: Module Health
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Mondays 06:00 UTC
|
||||
- cron: '0 6 * * 1'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
audit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Run audits
|
||||
run: |
|
||||
node scripts/audit-modules.mjs
|
||||
node scripts/audit-module-coupling.mjs
|
||||
node scripts/audit-complexity.mjs || true
|
||||
node scripts/build-complexity-map.mjs
|
||||
|
||||
- name: Commit reports if changed
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
PATHS="docs/module-health.md docs/module-coupling.md docs/complexity-hotspots.md docs/complexity-map.html apps/mana/apps/web/static/admin/complexity-map.html"
|
||||
if git diff --quiet $PATHS 2>/dev/null; then
|
||||
echo "No changes to reports."
|
||||
exit 0
|
||||
fi
|
||||
git add $PATHS 2>/dev/null || true
|
||||
git commit -m "chore(audit): weekly module health report
|
||||
|
||||
Co-Authored-By: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
|
||||
git push
|
||||
Loading…
Add table
Add a link
Reference in a new issue