From a8f5d9f90e0febb2a88ad3860d065c96c6e27a9b Mon Sep 17 00:00:00 2001 From: eitighis Date: Thu, 24 Sep 2026 14:31:19 +0100 Subject: [PATCH] ci(web): enforce coverage floor in CI Add vitest coverage thresholds (statements 60 / branches 50 / functions 65 / lines 60) as a ratchet just below the current baseline (65.62 / 59 / 70.7 / 66.19), and switch the CI test step to `npm run test:coverage` so the floor is enforced on every push and PR. Fails on regression without turning main red today. --- .github/workflows/ci.yml | 2 +- vite.config.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0da3e51..702e372 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,4 +38,4 @@ jobs: run: npm run lint - name: Test - run: npm test + run: npm run test:coverage diff --git a/vite.config.ts b/vite.config.ts index 9fb9ba4..0525a5b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -15,6 +15,14 @@ export default defineConfig({ 'src/test/', '**/*.d.ts', ], + // Ratchet floor: locked just below current coverage so CI fails on + // regression without going red on today's baseline. Raise as coverage grows. + thresholds: { + statements: 60, + branches: 50, + functions: 65, + lines: 60, + }, }, }, })