Files
zhangxiang 0da1fa4255 docs(evidence): §12.13 终版复验的车道脚本与逐名清单、axe 两份证据入库
- run-post-schema-lane.sh:schema 落地后的整链复验编排(build → test:all → axe →
  视觉只读 → GA4 → Lighthouse),取码方式仍是「重定向后读 $?」,不用管道。
- visual-manifest-post-schema.json:total=125 / passed=125 / failed=0,
  由 scripts/visual-manifest.mjs 产出(空日志走 EXIT=2,不与"全绿"同码)。
- axe-evidence:本轮跑闸刷新 2026-10-17-axe/ 与 latest 指针两处,
  这正是 §11.6 那条「证据应按轮次分目录」改造的第一次真实生效。
2026-10-17 09:31:15 +08:00

22 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
# §12.12(schema 落地)之后的终版复验:不能让"之前绿过"当终版读数。
set -u
cd "$(git rev-parse --show-toplevel)" || exit 1
SUM=/tmp/13-final.txt; : > "$SUM"
say() { echo "$1" >> "$SUM"; }
npm run build > /tmp/f3-build.log 2>&1; say "BUILD=$?"
npm run test:all > /tmp/f3-testall.log 2>&1; say "TEST_ALL=$?"
grep -E '^Tests:|^Test Suites:' /tmp/f3-testall.log | tail -2 >> "$SUM"
grep -E '[0-9]+ (passed|failed)' /tmp/f3-testall.log | tail -1 >> "$SUM"
(PORT=3100 node dist/standalone/server.js > /tmp/f3-srv.log 2>&1 & echo $! > /tmp/f3-srv.pid)
sleep 10
BASE=http://localhost:3100 npm run check:axe:routes > /tmp/f3-axe-routes.log 2>&1; say "AXE_ROUTES=$?"
BASE=http://localhost:3100 npm run check:axe > /tmp/f3-axe.log 2>&1; say "AXE=$?"
grep -E 'PASSED =|bgMismatch|violationNodes|unexpectedStatus' /tmp/f3-axe.log | head -4 >> "$SUM"
kill "$(cat /tmp/f3-srv.pid)" 2>/dev/null; sleep 3
(cd e2e && npx playwright test visual-regression.spec.ts --update-snapshots=none > /tmp/f3-vis.log 2>&1); say "VIS_READONLY=$?"
(cd e2e && E2E_TARGET=production npx playwright test ga4-event-tracking.spec.ts --project=chromium --project=chromium-mobile --project=firefox --project=webkit > /tmp/f3-ga4.log 2>&1); say "GA4=$?"
node scripts/visual-manifest.mjs /tmp/f3-vis.log docs/acceptance/2026-10-17-final/visual-manifest-post-schema.json; say "MANIFEST=$?"
npm run lighthouse > /tmp/f3-lh.log 2>&1; say "LIGHTHOUSE=$?"
say DONE