Sprint 4 T-B-24 · Lighthouse CI (G3 闸门真实化)

- apps/web/lighthouserc.cjs: desktop preset, 3 runs, P/A/B/S ≥ 90 断言
- apps/web/scripts/lhci-scores.cjs: 本地汇总脚本(median P/A/B/S + / 标记)
- .github/workflows/web-ci.yml: 新增 lighthouse job,treosh/lighthouse-ci-action@v12
- apps/web/package.json: +lhci script
- apps/web/.gitignore: .lighthouseci/ 加入忽略(避免本地 12 个 run 报告污染 repo)

本地验证(desktop preset, 3 runs × 4 URLs):
  perf=100  a11y=95-96  best=96  seo=91  (全部 ≥ 90 )

G3 闸门状态:typecheck  / lint  / vitest 69  / e2e 84/84 
             / build 87.85KB  / Lighthouse P/A/B/S 
             / 真实后端 (T-B-27)/ Poster CLI Docker (T-C-44)
This commit is contained in:
Frontend Developer
2026-07-04 10:08:10 +08:00
parent 1a494396f9
commit 61ba0ca987
6 changed files with 2033 additions and 0 deletions

View File

@@ -16,6 +16,7 @@
"test:e2e": "playwright test",
"test:storybook": "echo 'storybook is a Sprint 5 task'",
"chromatic": "chromatic --project-token=__CHROMATIC_TOKEN__ --exit-zero-on-changes",
"lhci": "lhci autorun --config=./lighthouserc.cjs",
"codegen": "tsx scripts/codegen.ts",
"codegen:check": "tsx scripts/codegen-check.ts",
"clean": "rm -rf dist .vite .turbo coverage playwright-report test-results"
@@ -45,6 +46,7 @@
},
"devDependencies": {
"@eslint/js": "^9.39.4",
"@lhci/cli": "^0.14.0",
"@playwright/test": "^1.49.0",
"@tailwindcss/vite": "^4",
"@testing-library/jest-dom": "^6.6.3",