-
-
Notifications
You must be signed in to change notification settings - Fork 97
Expand file tree
/
Copy pathcodecov.yml
More file actions
60 lines (56 loc) · 2.76 KB
/
Copy pathcodecov.yml
File metadata and controls
60 lines (56 loc) · 2.76 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
# Codecov — the primary PR coverage gate (replaces the fixed absolute-% pin that
# vitest.config.ts used to enforce; those thresholds are now just a backstop
# floor). This is DELTA-based, so it never causes the "every PR must match a
# near-peak absolute number and one merge pushes the others below it" churn:
# - `project` compares total coverage to the PR base, tolerating a small drop.
# - `patch` checks only the lines THIS PR changed (the real "test your new
# code" signal — PR-local, independent of global fluctuation).
# The uploaded lcov is already scoped to runtime code (src/** + workers/** + 5
# named scripts) by vitest's coverage.include, so Codecov reports only those.
# The test job uploads ONE coverage report PER MATRIX LEG, and no leg is a valid
# denominator alone: scripts/run-ci-tests.ts splits the suite into a
# shared-registry pass and an isolated vi.mock pass (#8922), and #10414 shards
# the shared pass across runners. A single leg measures far below the whole --
# the shared pass alone was ~89.9% lines purely because the other pass's files
# were missing from it.
#
# So Codecov must WAIT for every leg. Without this it computes project/patch off
# whichever reports landed first and posts a "drop" that is an artefact of
# counting a subset: at 2 it fired on 2 of 4 legs and reported 95.77% (-2.17%),
# a false red caused entirely by not waiting.
#
# ONE, because the workflow now does ONE upload: every matrix leg publishes its
# report as an artifact and a single `coverage` job merges and uploads them
# (#10414). That is deliberately not the same as trusting Codecov to merge N
# concurrent uploads -- at 2 it fired on 2 of 4 legs and reported 95.77%
# (-2.17%), a false red caused entirely by not waiting.
#
# Consolidating removes the coupling as well as the bug: this number no longer
# tracks how many shards exist, so adding a shard cannot silently turn a partial
# merge into a reported coverage regression. validate-workflows asserts the
# consolidation is still in place.
codecov:
notify:
after_n_builds: 1
coverage:
status:
project:
default:
target: auto # compare against the PR base, not a fixed number
threshold: 1% # tolerate up to a 1% total drop before failing
informational: false
patch:
default:
target: 99% # near-zero slack for changed runtime code
threshold: 0%
only_pulls: true
informational: false
comment:
layout: "condensed_header, diff, files"
behavior: default
require_changes: false
# Codecov's own status checks are only merge-blocking if added to branch
# protection's required checks (metagraphed's are intentionally empty — the owner
# admin-merges). Until then these are informative PR annotations + the dashboard.
github_checks:
annotations: true