Repository navigation
Expand file tree
/
Copy pathcodecov.yml
More file actions
46 lines (45 loc) · 2.25 KB
/
Copy pathcodecov.yml
File metadata and controls
46 lines (45 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# See https://github.com/bergerx/kubectl-status/issues/858: without this, Codecov posts the PR
# comment/status check as soon as it receives the *first* upload for a commit, so the initial
# comment only reflects whichever flag's job finished first and the rest show up later as silent
# edits. .github/workflows/ci-test.yml uploads three separate flags per commit -- unittests
# (`make test`), e2e (`make test-e2e`), templates (this repo's own .tmpl line coverage, see
# pkg/plugin/template_coverage.go) -- so wait for all three before notifying.
#
# Tradeoff: since the e2e job can take up to ~30 min, this delays the PR comment/status until it
# finishes, rather than getting quick feedback from the unittests upload alone. If any of these
# three uploads is ever made conditional (e.g. skipped for docs-only changes), coverage
# targets/thresholds added here later will need `carryforward: true` for that flag, or a commit
# where it didn't run will be treated as 0% for that flag -- see #858.
codecov:
notify:
after_n_builds: 3
# Per-flag project checks, targeted at each flag's baseline on master as of 2026-08-18 (PR #859:
# unittests 74.72%, e2e 83.37%, templates 64.04%) -- see #858. Targets are set a point or two
# below that baseline rather than at it, so this only fails a PR that meaningfully regresses
# coverage, not one that happens to land a fraction of a percent under today's number; it's
# intentionally not raising the bar to require improvement over what's already merged.
#
# `default: false` turns off Codecov's own flagless "project" check, which otherwise blends these
# three unrelated line-coverage reports (Go source lines from unittests/e2e vs. .tmpl template
# lines, see pkg/plugin/template_coverage.go) into one number that moves for reasons unrelated to
# either kind of coverage -- e.g. PR #859 added the templates flag and the blended figure dropped
# from ~84% to ~69% despite no coverage regression in either underlying report.
coverage:
status:
project:
default: false
unittests:
flags:
- unittests
target: 74%
threshold: 1%
e2e:
flags:
- e2e
target: 83%
threshold: 1%
templates:
flags:
- templates
target: 64%
threshold: 1%