Skip to content

Commit 0090b54

Browse files
refactor(ci): add vitest coverage threshold gate to CI pipeline
1 parent c449e64 commit 0090b54

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: npm run typecheck
3535

3636
- name: Run Unit Tests (Vitest)
37-
run: npm run test
37+
run: npm run test:coverage
3838

3939
build:
4040
name: Production Build

vitest.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ export default defineConfig({
77
globals: true,
88
include: ['**/*.test.ts', '**/*.test.tsx'],
99
exclude: ['node_modules', '.next'],
10+
coverage: {
11+
provider: 'v8',
12+
reporter: ['text', 'lcov'],
13+
thresholds: {
14+
statements: 70,
15+
branches: 70,
16+
functions: 70,
17+
lines: 70,
18+
},
19+
},
1020
},
1121
resolve: {
1222
alias: {

0 commit comments

Comments
 (0)