-
Notifications
You must be signed in to change notification settings - Fork 222
Expand file tree
/
Copy pathcodecov.yml
More file actions
138 lines (130 loc) · 4.18 KB
/
Copy pathcodecov.yml
File metadata and controls
138 lines (130 loc) · 4.18 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Codecov configuration for redhat-developer/rhdh
# Reference: https://docs.codecov.com/docs/codecov-yaml
#
# Jira: RHIDP-13230 — Configure Codecov foundation for rhdh repo
# Feature umbrella: RHDHPLAN-851
#
# Pattern: modeled after the ROSA CLI CodeCov integration (informational
# checks while coverage matures), plus the RHDH Test Strategy Proposal
# scope defined in Section 5.
codecov:
require_ci_to_pass: false
notify:
wait_for_ci: true
# Files and paths included in coverage measurement.
# Keep this list aligned with the Jest collectCoverageFrom that will land
# with RHIDP-13232 so there is no drift between the coverage collector
# and the Codecov report filter.
coverage:
precision: 2
round: down
range: "40...80"
status:
# Project-level check — coverage of the whole repo.
# Informational while the suite matures; enforcement is activated in
# a later Story (progressive thresholds per Strategy Proposal).
project:
default:
target: auto
threshold: 100%
informational: true
only_pulls: false
# Patch-level check — coverage of the lines added/changed in the PR.
# Informational initially; becomes blocking at 1.10.x maturity and
# is raised again at release 2.1 (see RHIDP-13232 progressive thresholds).
patch:
default:
target: auto
threshold: 100%
informational: true
# Paths included in the Codecov report. Must match the Jest
# collectCoverageFrom scope.
# Upstream Test Strategy Proposal (Google Doc) Section 5 defines these exact
# paths for RHDH-owned source.
comment:
layout: "header, diff, flags, components, footer"
behavior: default
require_changes: false
show_carryforward_flags: true
ignore:
- "**/*.test.ts"
- "**/*.test.tsx"
- "**/*.spec.ts"
- "**/*.spec.tsx"
- "**/index.ts"
- "**/__fixtures__/**"
- "**/__tests__/**"
- "**/__mocks__/**"
- "**/dist/**"
- "**/build/**"
- "**/node_modules/**"
- "e2e-tests/**"
- "dynamic-plugins/wrappers/**"
- ".claude/**"
- "docs/**"
# Flags let us view coverage per area in the Codecov dashboard.
# - rhdh: the main monorepo Jest/Backstage CLI run
# Additional flags (overlays-e2e-*, community-*) will be introduced by
# the respective Stories under RHIDP-11866 and RHIDP-11865.
# Components give a per-area coverage breakdown in the dashboard and in the
# PR comment (the comment layout above already renders a `components` section).
# Unlike flags, components are pure path-based views over the same uploads, so
# they need no CI changes. Statuses are informational while coverage matures,
# matching the project/patch approach above.
component_management:
default_rules:
statuses:
- type: project
target: auto
informational: true
individual_components:
- component_id: backend_plugins
name: Backend plugins
paths:
- plugins/*/src/**
- component_id: backend_app
name: Backend app
paths:
- packages/backend/src/**
- component_id: frontend_app
name: Frontend app
paths:
- packages/app/src/**
- component_id: plugin_utils
name: Plugin utils
paths:
- packages/plugin-utils/src/**
- component_id: dynamic_plugins_utils
name: Dynamic plugins utils
paths:
- dynamic-plugins/_utils/src/**
flag_management:
default_rules:
carryforward: true
statuses:
- type: project
target: auto
threshold: 100%
- type: patch
target: auto
threshold: 100%
individual_flags:
- name: rhdh
paths:
- plugins/*/src/**
- packages/app/src/**
- packages/backend/src/**
- packages/plugin-utils/src/**
- dynamic-plugins/_utils/src/**
carryforward: true
# Paths intentionally mirror the rhdh flag — both measure the same source
# from different test types. Isolation relies on --flag at upload time,
# not on paths. If an upload omits --flag, data lands under "default".
- name: rhdh-e2e-frontend
paths:
- plugins/*/src/**
- packages/app/src/**
- packages/backend/src/**
- packages/plugin-utils/src/**
- dynamic-plugins/_utils/src/**
carryforward: true