From fafa626829b6c43a9912534ef75348770de6e9df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=81=B5=E5=BA=94?= Date: Sun, 19 Jul 2026 15:08:27 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=8F=90=E5=8D=87=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E5=8D=95=E6=B5=8B=E8=A6=86=E7=9B=96=E7=8E=87=E9=97=A8=E7=A6=81?= =?UTF-8?q?=E5=88=B050%=EF=BC=88=E8=A1=8C/=E5=88=86=E6=94=AF=EF=BC=89/20%?= =?UTF-8?q?=EF=BC=88=E5=87=BD=E6=95=B0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 行覆盖率门槛:0.5% → 50%(当前实际61.9%,留12%余量) - 分支覆盖率门槛:0.5% → 50%(当前实际61%,留11%余量) - 函数覆盖率门槛:0.5% → 20%(当前实际25%,留5%余量) - 后续覆盖率提升后再逐步上调门槛 关联:#540 前端单测接入CI --- apps/web/vitest.config.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/web/vitest.config.ts b/apps/web/vitest.config.ts index 6be4c880b..601d38f90 100755 --- a/apps/web/vitest.config.ts +++ b/apps/web/vitest.config.ts @@ -17,12 +17,12 @@ export default defineConfig({ provider: "v8", reporter: ["text", "json", "html"], exclude: ["node_modules/", "src/test/", "e2e/", "**/*.d.ts", "**/*.config.*", "**/mockData"], - // CI 覆盖率门禁(极低门槛起步,逐步提升) - // 当前实际覆盖率约 0.8%/0.9%/1.1%,先设极低门槛确保CI跑通 + // CI 覆盖率门禁(Phase 4 后提升,逐步逼近目标) + // 当前实际:行 ~62% / 分支 ~61% / 函数 ~25% thresholds: { - lines: 0.5, - functions: 0.5, - branches: 0.5, + lines: 50, + branches: 50, + functions: 20, }, }, }, -- 2.54.0