Repository navigation
Expand file tree
/
Copy pathcodecov.yml
More file actions
76 lines (69 loc) · 3.19 KB
/
Copy pathcodecov.yml
File metadata and controls
76 lines (69 loc) · 3.19 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 is advisory here: none of these statuses are in the branch ruleset's
# required checks, so a coverage drop annotates the PR without blocking it.
# Promoting one to required is a ruleset change, not a change to this file.
coverage:
status:
# `auto` compares against the PR base rather than an absolute number, so a
# historically under-covered file never fails a PR that does not touch it.
# The threshold is what makes this a regression gate instead of noise.
project:
default:
target: auto
threshold: 1%
# Coverage of the lines this PR actually changed. Held to a real number
# because it is the only figure the author can act on directly.
patch:
default:
target: 80%
threshold: 0%
# The frontend has ten spec files against 428 components. Holding new
# frontend lines to the backend's 80% would fail nearly every UI PR, so
# it tracks its own base until there is a suite worth holding to a number.
frontend:
flags: [frontend]
target: auto
threshold: 0%
# Path-based, so these cost no extra upload and no CI change -- they slice the
# report python-test already produces. Paths carry the src/dispatch prefix
# because coverage.xml names files relative to <source>src/dispatch</source>
# and Codecov joins the two; without it every component matches nothing.
#
# No component statuses on purpose. Making three more checks fail before anyone
# has agreed these numbers should move is how coverage gates get ignored.
component_management:
individual_components:
# The orchestration layer -- incident and case lifecycle. Its own component
# because */models.py is 95.5% (declarative classes, covered by being
# imported) and drags the project figure well above what the logic scores.
- component_id: flows
name: flows
paths: ["src/dispatch/**/flows.py"]
# Provider integrations. Six of roughly seventeen provider packages have a
# test suite, so this moves for reasons the project figure hides.
- component_id: plugins
name: plugins
paths: ["src/dispatch/plugins/**"]
# Chosen for consequence rather than size: there is no tests/auth directory.
- component_id: auth
name: auth
paths: ["src/dispatch/auth/**"]
# Two uploads now, from two jobs, so the split is real rather than decorative.
# Judged separately: the frontend is 10% of a codebase larger than the backend,
# and a blended figure would let either side hide behind the other.
# No `paths:` on either -- a flag covers whatever its upload contained, and the
# two reports are disjoint. Scoping backend to src/dispatch/ would also match
# src/dispatch/static/dispatch/src/, i.e. the frontend. carryforward is off
# because both jobs run on every PR, so a report is never missing.
flags:
backend:
carryforward: false
frontend:
carryforward: false
comment:
layout: "condensed_header, diff, flags, components, files"
# Nothing to say on a PR that changes no covered line.
require_changes: true
# The suite runs under pytest-xdist and pytest-cov combines the workers into a
# single report before upload, so exactly one file arrives per commit.
codecov:
require_ci_to_pass: true