-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodecov.yml
More file actions
54 lines (52 loc) · 2.38 KB
/
Copy pathcodecov.yml
File metadata and controls
54 lines (52 loc) · 2.38 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
coverage:
status:
project:
default:
target: auto
threshold: 5%
if_ci_failed: error
patch:
default:
target: 50%
if_ci_failed: error
# Rationale: cargo-llvm-cov counts every line of inline
# `#[cfg(test)] mod tests { ... }` in a production file as part
# of that file's diff. For new crates (CLI / boot / I/O
# wrappers) where much of the code path needs a live process or
# DB to exercise, the inline test bodies inflate the denominator
# faster than production code gets covered. 50% still catches
# PRs that ship entirely untested logic while leaving room for
# new modules whose happy path is exercised end-to-end rather
# than line-by-line.
comment:
layout: "reach, diff, flags, files"
require_changes: false
# Files whose every line needs a live database / GCP credential to exercise
# — sqlx::query! macros expand to dozens of synthetic lines per call site,
# none of which run under cargo test without DATABASE_URL pointing at the
# right schema. Excluding from coverage stops these from dragging the
# patch ratio under the 50% gate while the helpers around them are still
# unit-tested.
#
# `overslash-fakes` is the e2e fake-upstream crate (Stripe, OAuth AS,
# OpenAPI, MCP, multi-IdP). Its routes only run under the live
# Playwright stack (`make e2e-up` + `npx playwright test`), so unit-test
# coverage is structurally 0%; we measure correctness via the e2e specs
# that drive these handlers.
#
# `services/key_rotation.rs` + `cli/src/reencrypt.rs`: the re-encrypt
# loop's runtime body (paged SELECT, CAS UPDATE, dispatch over the
# encrypted-column target table) only runs against a live Postgres with
# real seeded rows — covered end-to-end by
# `crates/overslash-api/tests/key_rotation.rs`, but llvm-cov never sees
# those line hits attributed to the lib's `src/` because nextest runs each
# integration test in its own process. The pure decision helpers
# (`classify_row`, `Stats::add`, `Options::default`) and the unit-
# testable parts of `Keyring` stay covered in `crypto.rs`; what's
# excluded is the per-row SQL machinery, which is structurally
# unreachable from a non-DB test.
ignore:
- "crates/overslash-metrics-exporter/src/queries.rs"
- "crates/overslash-fakes/**"
- "crates/overslash-api/src/services/key_rotation.rs"
- "crates/overslash-cli/src/reencrypt.rs"