-
-
Notifications
You must be signed in to change notification settings - Fork 149
Expand file tree
/
Copy path.codecov.yml
More file actions
121 lines (114 loc) · 3.53 KB
/
.codecov.yml
File metadata and controls
121 lines (114 loc) · 3.53 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
codecov:
require_ci_to_pass: yes
notify:
# Coverage uploads arrive from three independent workflows (backend.yml,
# frontend.yml, frontend-e2e.yml) with staggered finish times, and any
# subset may skip due to path filters. manual_trigger suppresses auto-
# notifications so Codecov only fires status/comments once the
# codecov-notify.yml workflow calls send-notifications after every
# upload-producing workflow has finished for this SHA.
manual_trigger: true
coverage:
precision: 2
round: down
range: "70...100"
status:
project:
default:
target: auto
# informational: true forces the status to always post, even
# without a baseline on main. Once a baseline is established,
# this can be removed and the status will start gating PRs.
informational: true
patch:
default:
target: auto
changes: false
flags:
backend:
paths:
- opencontractserver/
- config/
carryforward: true
frontend-unit:
paths:
- frontend/src/
carryforward: true
frontend-component:
paths:
- frontend/src/
carryforward: true
frontend-e2e:
paths:
- frontend/src/
carryforward: true
# Merged frontend flag that the README badge reads. Populated by tagging
# each per-suite upload (`frontend-unit`, `frontend-component`,
# `frontend-e2e`) with `frontend` as an additional flag in its workflow,
# so Codecov aggregates the union of the three uploads server-side.
# `carryforward: true` is load-bearing — a backend-only commit path-filters
# all three producing workflows out, so without carryforward the badge
# would drop to "unknown" on those commits; with it, the flag reuses the
# last known coverage from the parent commit. Intentionally does NOT
# match the `frontend-.*` regex used by the component_management block
# below, so the `frontend` component keeps aggregating only the three
# per-suite flags and doesn't double-count this merged flag.
frontend:
paths:
- frontend/src/
carryforward: true
backend-e2e:
paths:
- opencontractserver/
- config/
carryforward: true
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no
comment:
layout: "reach,diff,flags,components,files,footer"
behavior: default
require_changes: no
# Components group flags into logical areas for reporting and PR status.
# Flags alone can't express "frontend union" because the three frontend
# flags overlap on the same paths. Components merge them so PR comments
# and the Codecov UI show a single backend number and a single frontend
# number instead of five flag numbers that users must mentally combine.
component_management:
default_rules:
statuses:
- type: project
target: auto
threshold: 1%
- type: patch
target: auto
threshold: 1%
individual_components:
- component_id: backend
name: Backend
paths:
- opencontractserver/**
- config/**
flag_regexes:
- backend.*
- component_id: frontend
name: Frontend
paths:
- frontend/src/**
flag_regexes:
- frontend-.*
ignore:
- "opencontractserver/tasks/data_extract_tasks.py"
- "opencontractserver/tests/**"
- "**/migrations/**"
- "opencontractserver/**/migrations/*.py"
- "opencontractserver/*/migrations/*.py"
- "config/settings/test*.py"
- "frontend/src/**/*.test.{ts,tsx}"
- "frontend/src/setupTests.ts"
- "frontend/tests/**"
- "frontend/*.config.ts"