Skip to content

Commit f181fa3

Browse files
authored
chore(ci): add codecov config to reduce noise on small refactors (#1044)
The repo currently has no `codecov.yml`, so Codecov uses its strict defaults: any coverage drop (project) and any patch under 100% are reported as failing statuses on PRs. This produces frequent red checks on small refactors even when coverage is unchanged or trivially impacted (e.g. #1035, #1038). This change adds a minimal `codecov.yml` that keeps useful signal while removing the noise: - `coverage.status.project.default.threshold: 1%` — allow up to a 1% project-coverage drop without failing. - `coverage.status.project.default.if_ci_failed: success` — don't double-report when the CI run itself failed. - `coverage.status.patch.default.informational: true` — still report patch coverage, but never block PRs on it. - `comment.require_changes: true` — only post a PR comment when coverage actually changes. Validated with `curl --data-binary @codecov.yml https://codecov.io/validate` → `Valid!`. Real coverage regressions will still surface (anything > 1% project drop), and contributors keep getting patch-coverage feedback — it just won't block.
1 parent ba42586 commit f181fa3

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

codecov.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# https://docs.codecov.com/docs/codecov-yaml
2+
coverage:
3+
status:
4+
project:
5+
default:
6+
target: auto
7+
# Allow small coverage fluctuations without failing the check.
8+
threshold: 1%
9+
# Don't fail codecov if the CI run itself failed (avoids double-noise).
10+
if_ci_failed: success
11+
patch:
12+
default:
13+
# Report patch coverage, but never block the PR on it.
14+
informational: true
15+
16+
# Recompute the base when code is removed so refactors don't appear to
17+
# regress overall coverage.
18+
codecov:
19+
notify:
20+
after_n_builds: 1
21+
require_ci_to_pass: true
22+
23+
comment:
24+
layout: "reach,diff,flags,files"
25+
behavior: default
26+
require_changes: true # only post a PR comment when coverage actually changed

0 commit comments

Comments
 (0)