Skip to content

Commit e83611b

Browse files
fix(ci): remove jest coverageThreshold — tighten codecov.yml to 80% hard floor
In the split CI matrix (unit / integration / e2e), each job only loads its slice of collectCoverageFrom paths, so a global Jest threshold always fails (reports 61% instead of 80%). The correct enforcement layer is Codecov, which merges unit + integration flags server-side before applying the gate. Changes: - jest.config.js: remove coverageThreshold; add explanatory comment (efd7bbc rationale) - codecov.yml: harden project target from `auto` to 80% hard floor to prevent long-term coverage decay; patch stays `auto` (new code matches local module baseline)
1 parent 2c95b55 commit e83611b

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

codecov.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ coverage:
22
status:
33
project:
44
default:
5-
target: auto
6-
threshold: 0.5%
5+
target: 80% # hard floor — prevents long-term coverage decay (auto allows drift)
6+
threshold: 0.5% # allow ≤0.5% transient drop within the 80% floor
77
flags:
88
- unit
99
- integration
1010
patch:
1111
default:
12-
target: auto
13-
threshold: 0%
12+
target: auto # new code must match local module baseline (not abstract 80%)
13+
threshold: 0% # no tolerance on new code
1414
flags:
1515
- unit
1616
- integration

jest.config.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,13 @@ export default {
6767
// A list of reporter names that Jest uses when writing coverage reports
6868
coverageReporters: ['json', 'lcov', 'clover', 'text'],
6969

70-
// Codecov delta gating (codecov.yml) stays as a second layer; both gates are active.
71-
coverageThreshold: {
72-
global: {
73-
statements: 80,
74-
branches: 65,
75-
functions: 80,
76-
lines: 80,
77-
},
78-
},
70+
// coverageThreshold removed — coverage gating moved to Codecov status checks.
71+
// In the split test matrix (unit / integration / e2e), each CI job only sees
72+
// its slice of `collectCoverageFrom`, so a global Jest threshold would fail
73+
// in every job (61% instead of 80% because only one suite's paths are loaded).
74+
// Codecov merges the unit + integration flags server-side and applies an 80%
75+
// project floor there (see codecov.yml status.project). This was the design
76+
// since efd7bbc7 (2026-05-01) — not a loosening of coverage enforcement.
7977

8078
// Make calling deprecated APIs throw helpful error messages
8179
// errorOnDeprecated: false,

0 commit comments

Comments
 (0)