Skip to content

Commit abe4a70

Browse files
committed
chore(baseline): add frontend audit (npm audit + Vite + Playwright)
1 parent c103bb8 commit abe4a70

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
OUT="docs/superpowers/baselines/2026-04-17/raw/frontend"
4+
mkdir -p "$OUT"
5+
6+
cd src/main/frontend
7+
npm ci 2>&1 | tee "$OLDPWD/$OUT/npm-ci.log"
8+
npm audit --json > "$OLDPWD/$OUT/npm-audit.json" || true
9+
npm run build 2>&1 | tee "$OLDPWD/$OUT/build.log"
10+
# Playwright — allow failure so we capture the baseline pass rate.
11+
npx playwright install --with-deps chromium 2>&1 | tee "$OLDPWD/$OUT/playwright-install.log" || true
12+
npm run test:e2e -- --reporter=list 2>&1 | tee "$OLDPWD/$OUT/playwright.log" || true
13+
cd -
14+
15+
python3 - <<'PY' > "$OUT/playwright-summary.json"
16+
import re, json
17+
log=open("docs/superpowers/baselines/2026-04-17/raw/frontend/playwright.log").read()
18+
# "X passed, Y failed, Z skipped" at end
19+
m=re.search(r"(\d+)\s+passed", log); passed=int(m.group(1)) if m else 0
20+
m=re.search(r"(\d+)\s+failed", log); failed=int(m.group(1)) if m else 0
21+
m=re.search(r"(\d+)\s+skipped", log); skipped=int(m.group(1)) if m else 0
22+
print(json.dumps({"passed":passed,"failed":failed,"skipped":skipped}, indent=2))
23+
PY
24+
cat "$OUT/playwright-summary.json"

0 commit comments

Comments
 (0)