-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcodecov.yml
More file actions
105 lines (100 loc) · 3.95 KB
/
Copy pathcodecov.yml
File metadata and controls
105 lines (100 loc) · 3.95 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
codecov:
notify:
# Wait for every CI workflow to finish before posting status
# checks. Without this, the per-file `codecov/changes` gate
# fires immediately when ANY coverage upload arrives — but
# the test job in ci.yml uploads its coverage report well
# after the codecov bot has already evaluated whatever was
# in its cache, so codecov/changes can report stale per-file
# numbers (and fail) on commits whose fresh coverage actually
# improves the gate. wait_for_ci removes the race by holding
# the status post until all uploads are in.
wait_for_ci: true
# Vendored third-party code that ships in-tree under pkg/goldmark/
# (goldmark@v1.8.2 fork, part of the main module so `go install
# m@version` works — replace directives are rejected there).
# mdsmith does not own these tests, so the upstream branch
# coverage they have is irrelevant to project health; exclude them
# from every codecov metric so the `changes` per-file gate does
# not see them as new files to grade.
ignore:
- "pkg/goldmark/**"
coverage:
status:
project:
default:
target: auto
# Tolerate tiny dips from deleting well-covered
# code (the project average drifts toward the
# mean). patch stays at 0%, so undertested new
# code still fails.
threshold: 0.2%
# Fork PRs skip the Codecov upload (see ci.yml's
# upload steps gated on head.repo.full_name).
# Without these, the required status check would
# never post on a fork PR and branch protection
# would block the merge. `success` posts a passing
# status when no report arrives or no base report
# exists — same-repo PRs still gate on real numbers.
if_no_uploads: success
if_not_found: success
patch:
default:
target: auto
threshold: 0%
if_no_uploads: success
if_not_found: success
# Per-file gate: fail the status check if any
# file's coverage decreased vs the base commit.
#
# Disabled in plan 198 — the goldmark vendor introduces a large
# set of new files, and even with the top-level `ignore:` rule
# for pkg/goldmark/** the gate continues firing on noise
# (the codecov bot posts the status check before the test
# upload arrives, and on this PR the carry-forward path picks
# up stale per-file numbers). The patch and project gates remain
# enabled and are the real coverage barrier; revisit once the
# vendor settles into main.
changes:
default:
enabled: false
if_no_uploads: success
if_not_found: success
# Coverage is uploaded with a flag per language so each report
# only contains the files it actually measured. Without flags,
# Codecov treats unmeasured files (the entire other-language
# tree) as 0% coverage, which is misleading.
#
# carryforward is intentionally OFF. With it ON the base commit
# inherits coverage from an even-earlier commit (or a different
# Go toolchain) whose block coordinates may differ from the
# head's by a column or two — enough for Codecov's per-line
# attribution to flag non-statement lines (closing braces, blank
# lines, type declarations) as "indirect coverage changes" even
# when both sides measure 100% statement coverage of the same
# unchanged source. Disabling carryforward forces every PR base
# to be re-measured cleanly against the head's fresh upload, so
# the per-file `changes` gate only fires on real coverage shifts.
flag_management:
default_rules:
carryforward: false
individual_flags:
- name: go
paths:
- "**/*.go"
- name: typescript
paths:
- "editors/vscode/src/**"
component_management:
individual_components:
- component_id: go
name: Go
paths:
- "**/*.go"
- component_id: typescript
name: TypeScript
paths:
- "editors/vscode/src/**"
comment:
layout: "condensed_header, condensed_files, condensed_footer, components"
require_changes: true