-
-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathcodecov.yml
More file actions
76 lines (72 loc) · 3.84 KB
/
Copy pathcodecov.yml
File metadata and controls
76 lines (72 loc) · 3.84 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
# Codecov configuration.
#
# The real coverage gate is `patch`: changed lines and branches in a PR must be
# >=99% covered. Patch coverage depends only on the PR's own diff, so merging
# one PR can never push another below the bar -- this is what kills the cross-PR
# churn the old global vitest threshold caused.
#
# `project` (whole-repo total) is informational only: it is reported as a trend
# but never blocks a merge. vitest keeps a loose 90% local backstop separately.
codecov:
# Don't post a verdict until the CI run that produced the report has finished.
require_ci_to_pass: true
notify:
# The 6 backend test shards (validate-tests matrix, ci.yml) each upload their own lcov.info
# directly (flags: shard-N) -- additive by design, but Codecov re-evaluates and re-posts the
# status check after EVERY individual upload, not just the last one. Without this, codecov/patch
# can report a wildly wrong verdict (as low as ~20% "patch coverage") after only 1-2 of 6 shards
# have landed, before self-correcting once the rest arrive -- require_ci_to_pass above only checks
# the GH Actions run's own conclusion, it says nothing about upload completeness. Waiting for all
# 6 coverage uploads (JUnit test_results uploads are a separate stream and don't count here) before
# posting a status removes that premature-fail/premature-pass window entirely.
#
# Stays 6, not 7, even though review-enrichment adds a `rees` upload on REES PRs: 6 is the count that
# ALWAYS lands whenever validate-tests runs (the minimum floor), while the `rees` upload only exists on
# REES PRs. The `rees` report is produced by validate-code, which finishes its REES steps in seconds and
# so uploads well before any ~10-minute shard -- it is already merged in by the time the 6th shard trips
# this threshold, so no premature window opens for the review-enrichment diff either.
after_n_builds: 6
coverage:
status:
patch:
default:
target: 99%
threshold: 0%
# Keep the patch status in error if the upstream CI run failed.
if_ci_failed: error
# Suppress codecov/patch on main pushes; uploads still maintain history.
only_pulls: true
project:
default:
informational: true
# review-enrichment ships its coverage under its own flag (produced + uploaded by validate-code, ci.yml).
# Scoping the flag to review-enrichment/ keeps its project trend honest, and carryforward keeps that trend
# stable on PRs that don't re-run REES (its coverage is unchanged then, so nothing re-uploads under this flag).
# Patch gating (codecov/patch above) is unaffected by carryforward -- patch is computed on the PR's own diff,
# so a review-enrichment/** change is gated against this flag's fresh upload for that PR.
flags:
rees:
paths:
- review-enrichment/
carryforward: true
comment:
layout: "condensed_header, diff, flags, files"
require_changes: false
# Coverage is collected by vitest (v8) over src/**, packages/loopover-engine/src/**,
# and packages/loopover-miner/lib/** (plus review-enrichment/src/** via the standalone
# `rees` flag, c8 over its built dist remapped through source maps); mirror vitest's
# exclusions here so the Codecov total matches the local report.
ignore:
- "src/env.d.ts"
- "apps/**"
- "test/**"
- "scripts/**"
# Self-host process entry + build-time stubs: exercised by the Docker build+boot smoke test
# (.github/workflows/selfhost.yml), not unit-coverable without booting a server/subprocess.
- "src/server.ts"
- "src/selfhost/cf-workers-shim.ts"
- "src/selfhost/stubs/**"
# Postgres runtime adapters: validated by the real-Postgres integration test (test/integration/selfhost-pg.ts,
# gated on PG_TEST_URL) + the real-PG boot. The dialect translation itself IS unit-tested (pg-dialect.ts).
- "src/selfhost/pg-adapter.ts"
- "src/selfhost/pg-queue.ts"