Skip to content

Commit a68a882

Browse files
SchenLongclaude
andcommitted
test: full QA framework execution — R0–R6 coverage + E2E fixes + CI/CD
Phase R0 — Security infrastructure (55 tests): - api-route-access.test.ts: 28 tests (ARA-001–028) - request-origin.test.ts: 27 tests (RQORG-001–027) Phase R1 — LLM provider adapters (135 tests): - ollama, openai, anthropic, llamacpp, lmstudio, moonshot, zai, errors - Full validateConfig/testConnection/execute/estimateCost coverage Phase R2 — Database repositories (51 tests): - user.repository: UREPO-001–016 (password hashing, SafeUser projection) - audit.repository: AUDIT-001–014 (append-only, PII redaction) - scoreboard.repository: SCORE-001–010 - test-case.repository: TC-001–011 Phase R5 — Cross-package integration + fixtures (37 tests): - cross-package-integration: XPKG-001–012 (real scanner integration) - fixture-categories-extended: FCAT-001–025 (5 new categories) Phase R4 — CI/CD: - GitHub Actions workflow with unit + coverage + E2E jobs - Coverage thresholds: bu-tpi 80%, dojolm-web 70% Phase R6 — Lint/quality: - 19 lint warnings resolved → 0 warnings - aria-selected, useMemo deps, <Image>, timersRef cleanup E2E fixes (14 specs): - Scan timeouts: 90s budget for scanner/shingan/test-lab - Guard: auto-enable before toggle/threshold tests - Sensei drawer: animation wait + focus before Escape - Compliance: 30–40s waits for data load - Mobile nav: full aria-label names - kumite/llm-dashboard/atemi/kotoba/sengoku: timeout + networkidle Security: - npm audit fix: picomatch (HIGH ReDoS), brace-expansion, yaml — 0 vulns - batch route params: Next.js 15 async params fixed - file-storage.ts: createBatch always sets status: 'pending' Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8bfd41b commit a68a882

27 files changed

+627
-75
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
matrix:
2828
node-version: [20.x, 22.x]
29-
29+
3030
steps:
3131
- name: Checkout repository
3232
uses: actions/checkout@v4
@@ -46,19 +46,32 @@ jobs:
4646
- name: Run linter
4747
run: npm run lint
4848

49-
- name: Run tests
50-
run: npm test
49+
- name: Run unit tests with coverage (bu-tpi)
50+
run: npm test -w packages/bu-tpi -- --coverage
51+
52+
- name: Run unit tests with coverage (dojolm-web)
53+
run: npm test -w packages/dojolm-web -- --coverage
5154

5255
- name: Run regression tests (scanner vs fixtures)
5356
run: cd packages/bu-tpi && npm run test:regression
5457

58+
- name: Upload coverage reports
59+
if: always()
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: coverage-${{ matrix.node-version }}
63+
path: |
64+
packages/bu-tpi/coverage/
65+
packages/dojolm-web/coverage/
66+
retention-days: 14
67+
5568
# ============================================
5669
# Security Scan
5770
# ============================================
5871
security:
5972
name: Security Audit
6073
runs-on: ubuntu-latest
61-
74+
6275
steps:
6376
- name: Checkout repository
6477
uses: actions/checkout@v4
@@ -117,7 +130,7 @@ jobs:
117130
name: Documentation Quality
118131
runs-on: ubuntu-latest
119132
needs: [test]
120-
133+
121134
steps:
122135
- name: Checkout repository
123136
uses: actions/checkout@v4
@@ -145,7 +158,7 @@ jobs:
145158
runs-on: ubuntu-latest
146159
needs: [test]
147160
continue-on-error: ${{ github.event_name == 'schedule' }}
148-
161+
149162
steps:
150163
- name: Checkout repository
151164
uses: actions/checkout@v4
@@ -177,3 +190,43 @@ jobs:
177190
name: lychee-report
178191
path: lychee-report.md
179192
retention-days: 7
193+
194+
# ============================================
195+
# E2E Tests (Phase R4) — main branch only
196+
# ============================================
197+
e2e:
198+
name: E2E Tests (Playwright)
199+
runs-on: ubuntu-latest
200+
needs: [test]
201+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
202+
203+
steps:
204+
- name: Checkout repository
205+
uses: actions/checkout@v4
206+
207+
- name: Setup Node.js
208+
uses: actions/setup-node@v4
209+
with:
210+
node-version: '22'
211+
cache: 'npm'
212+
213+
- name: Install dependencies
214+
run: npm ci
215+
216+
- name: Install Playwright browsers
217+
run: cd packages/dojolm-web && npx playwright install chromium --with-deps
218+
219+
- name: Run E2E tests
220+
run: cd packages/dojolm-web && npx playwright test --project=chromium --reporter=github
221+
env:
222+
E2E_TARGET: prod
223+
E2E_BASE_URL: ${{ secrets.E2E_BASE_URL }}
224+
NODA_API_KEY: ${{ secrets.NODA_API_KEY }}
225+
226+
- name: Upload Playwright report
227+
if: failure()
228+
uses: actions/upload-artifact@v4
229+
with:
230+
name: playwright-report
231+
path: packages/dojolm-web/playwright-report/
232+
retention-days: 14

0 commit comments

Comments
 (0)