|
48 | 48 | [](https://github.com/Hack23/riksdagsmonitor/actions/workflows/javascript-testing.yml) |
49 | 49 | [](https://github.com/Hack23/riksdagsmonitor/actions/workflows/jsdoc-validation.yml) |
50 | 50 | [](https://github.com/Hack23/riksdagsmonitor/actions/workflows/translation-validation.yml) |
| 51 | +[](https://github.com/Hack23/riksdagsmonitor/actions/workflows/knip.yml) |
51 | 52 |
|
52 | 53 | ### Documentation & Release |
53 | 54 |
|
@@ -293,11 +294,12 @@ graph TB |
293 | 294 | ### Core CI/CD Workflows |
294 | 295 |
|
295 | 296 | 1. **✅ Quality Checks** (`.github/workflows/quality-checks.yml`) — ESLint linting, HTML validation, link checking |
296 | | -2. **🧪 TypeScript & JavaScript Testing** (`.github/workflows/javascript-testing.yml`) — Vitest unit tests, TypeScript type-checking, Cypress E2E |
297 | | -3. **📖 TypeDoc Validation** (`.github/workflows/jsdoc-validation.yml`) — API documentation generation and coverage |
298 | | -4. **🌐 Translation Validation** (`.github/workflows/translation-validation.yml`) — 14-language validation with RTL and hreflang |
299 | | -5. **🚀 Release with Attestations** (`.github/workflows/release.yml`) — SLSA provenance, SBOM, dual deployment |
300 | | -6. **☁️ Deploy to S3** (`.github/workflows/deploy-s3.yml`) — AWS S3/CloudFront deployment |
| 297 | +2. **🧹 Knip Dead Code Check** (`.github/workflows/knip.yml`) — Detects unused files, dependencies, binaries, and duplicate exports on every PR (informational pass also reports unused exports/types) |
| 298 | +3. **🧪 TypeScript & JavaScript Testing** (`.github/workflows/javascript-testing.yml`) — Vitest unit tests, TypeScript type-checking, Cypress E2E |
| 299 | +4. **📖 TypeDoc Validation** (`.github/workflows/jsdoc-validation.yml`) — API documentation generation and coverage |
| 300 | +5. **🌐 Translation Validation** (`.github/workflows/translation-validation.yml`) — 14-language validation with RTL and hreflang |
| 301 | +6. **🚀 Release with Attestations** (`.github/workflows/release.yml`) — SLSA provenance, SBOM, dual deployment |
| 302 | +7. **☁️ Deploy to S3** (`.github/workflows/deploy-s3.yml`) — AWS S3/CloudFront deployment |
301 | 303 |
|
302 | 304 | ### Security Scanning Workflows |
303 | 305 |
|
@@ -425,6 +427,7 @@ flowchart TB |
425 | 427 | | **ESLint** | Zero errors | quality-checks.yml | Required ✅ | |
426 | 428 | | **HTMLHint Validation** | Zero errors | quality-checks.yml | Required ✅ | |
427 | 429 | | **Link Integrity** | Zero broken internal links | quality-checks.yml | Required ✅ | |
| 430 | +| **Knip Dead Code (files/deps/dups)** | Zero unused files, deps, binaries, or duplicate exports | knip.yml | Required ✅ | |
428 | 431 | | **Unit Test Pass Rate** | 100% (2890 tests) | javascript-testing.yml | Required ✅ | |
429 | 432 | | **CodeQL SAST** | No critical/high | codeql.yml | Required ✅ | |
430 | 433 | | **Dependency Vulnerabilities** | No critical/high | dependency-review.yml | Required ✅ | |
@@ -1095,17 +1098,18 @@ flowchart LR |
1095 | 1098 | | 1.4 | 🏷️ Setup Labels | `setup-labels.yml` | Manual dispatch | A.5.37, PR.IP-1 | |
1096 | 1099 | | 1.5 | 🏷️ PR Labeler | `labeler.yml` | Pull requests | A.5.37, PR.IP-1 | |
1097 | 1100 |
|
1098 | | -### 🧪 Testing & Validation (7 workflows) |
| 1101 | +### 🧪 Testing & Validation (8 workflows) |
1099 | 1102 |
|
1100 | 1103 | | # | Workflow | File | Trigger | Coverage | |
1101 | 1104 | | --- | --- | --- | --- | --- | |
1102 | 1105 | | 2.1 | 🧪 TypeScript & JS Testing | `javascript-testing.yml` | Push/PR (TS/JS/HTML) | TSC + Vitest + Cypress | |
1103 | 1106 | | 2.2 | 📖 TypeDoc Validation | `jsdoc-validation.yml` | Manual dispatch | TypeDoc generation + coverage | |
1104 | 1107 | | 2.3 | ✅ Quality Checks | `quality-checks.yml` | Push/PR to main | ESLint + HTMLHint + linkinator | |
1105 | | -| 2.4 | 🌐 Translation Validation | `translation-validation.yml` | Push/PR (HTML) | 14-language + RTL + hreflang | |
1106 | | -| 2.5 | 🖥️ Test Dashboard | `test-dashboard.yml` | Push/PR (src/browser) | Dashboard Cypress E2E | |
1107 | | -| 2.6 | 🏠 Test Homepage | `test-homepage.yml` | Push/PR (src/browser) | Homepage Cypress E2E | |
1108 | | -| 2.7 | 📰 Test News | `test-news.yml` | Push/PR (news) | News pages Cypress E2E | |
| 1108 | +| 2.4 | 🧹 Knip Dead Code Check | `knip.yml` | Push/PR to main | Unused files, deps, binaries, duplicate exports (blocking); unused exports/types (informational) | |
| 1109 | +| 2.5 | 🌐 Translation Validation | `translation-validation.yml` | Push/PR (HTML) | 14-language + RTL + hreflang | |
| 1110 | +| 2.6 | 🖥️ Test Dashboard | `test-dashboard.yml` | Push/PR (src/browser) | Dashboard Cypress E2E | |
| 1111 | +| 2.7 | 🏠 Test Homepage | `test-homepage.yml` | Push/PR (src/browser) | Homepage Cypress E2E | |
| 1112 | +| 2.8 | 📰 Test News | `test-news.yml` | Push/PR (news) | News pages Cypress E2E | |
1109 | 1113 |
|
1110 | 1114 | ### 📊 CIA Data Pipeline (1 workflow) |
1111 | 1115 |
|
|
0 commit comments