-
Notifications
You must be signed in to change notification settings - Fork 285
/
.codecov.yml
253 lines (218 loc) · 6.42 KB
/
.codecov.yml
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
# For more configuration details:
# https://docs.codecov.io/docs/codecov-yaml
# After making edits, check if this file is valid by running:
# curl -X POST --data-binary @.codecov.yml https://codecov.io/validate
#
# Coverage configuration
# ----------------------
#
codecov:
#
# Show the Codecov status without waiting for other status to pass:
#
require_ci_to_pass: no
notify:
wait_for_ci: no
github_checks:
#
# Disable adding coverage annotations to the code in the GitHub
# Code Review for now:
#
# - The annotations consume a lot of space in the PR code review,
# and can make it hard to review files that are not covered yet.
#
# - The coverage can be visited using the Codecov link at all times.
# https://app.codecov.io/gh/xapi-project/xen-api/pulls
#
# - The annotations can be hidden in GitHub PR code review by
# pressing the "a" key or by deselecting the "Show comments"
# checkbox but they are shown by default.
#
# - The Codecov Chrome and Firefox extension is a much nicer
# way to indicate coverage:
#
# Link: https://github.com/codecov/codecov-browser-extension
#
# - How to enable: You need to log in to Codecov using Github.
# For Firefox, enable the needed permissions:
# https://github.com/codecov/codecov-browser-extension/issues/50
#
# Reference:
# http://docs.codecov.com/docs/common-recipe-list#disable-github-check-run-annotations
#
annotations: false
#
# Pull request comments:
# ----------------------
# This feature adds the code coverage summary as a comment on each PR.
# See https://docs.codecov.io/docs/pull-request-comments
# This same information is available from the Codecov checks in the PR's
# "Checks" tab in GitHub even when this feature is disabled.
#
comment:
#
# Legend:
# "diff" is the Coverage Diff of the pull request.
# "files" are the files impacted by the pull request
# "flags" are the coverage status of the pull request
#
# For an even shorter layout, this may be used:
# layout: "condensed_header, diff, files, flags"
#
layout: "header, diff, files, flags"
#
# Only add the Codecov comment to the PR when coverage changes
#
require_changes: true
#
# The overall project coverage is secondary to the individual coverage
# and it is always shown in the repository at:
# - https://app.codecov.io/gh/xapi-project/xen-api
#
hide_project_coverage: true
#
# Coverage limits and display details:
# ------------------------------------
#
coverage:
#
# Number of precision digits when showing coverage percentage e.g. 82.1%:
#
precision: 1
#
# Commit status checks and display:
# ---------------------------------
# https://docs.codecov.io/docs/commit-status
#
# target: Fail the PR if coverage is below that
# threshold: Allow reducing coverage by this amount
#
# - The values added are a very generous, friendly limit to not block most PRs
#
# - XAPI maintainers may tighten these screws more to require better tests
#
status: # global coverage status and limits
#
# Patch limits
# ------------
# These checks look at only the diff of the PR as basis for them.
#
patch:
scripts:
#
# The scripts limit applies to:
# -----------------------------
#
# - scripts/**
# - excluding: **/test_*.py
#
paths: ["scripts/**", "!**/test_*.py"]
#
# For scripts/** (excluding tests):
#
# For scripts, coverage should not be reduced compared to its base:
#
target: auto
#
# Exception: the threshold value given is allowed
#
# Allows for not covering 20% if the changed lines of the PR:
#
threshold: 20%
ocaml:
#
# The ocaml limit applies to:
# -----------------------------
#
# - ocaml/**
# - excluding: **/test_*.py
#
paths: ["ocaml/**", "!**/test_*.py"]
#
# For scripts/** (excluding tests):
#
# For scripts, coverage should not be reduced compared to its base:
#
target: auto
#
# Exception: the threshold value given is allowed
#
# Allows for not covering 20% if the changed lines of the PR:
#
threshold: 20%
python3:
#
# The python3 limit applies to:
# -----------------------------
#
# - python3/**
# - excluding: **/test_*.py
#
paths: ["python3/**", "!**/test_*.py"]
target: 80%
#
# Exception: the threshold value given is allowed
#
# Allows for not covering 20% if the changed lines of the PR:
#
threshold: 20%
#
# Project limits
# --------------
# These checks are relative to all code, not the changes (not the diff of the PR)
#
project:
#
# Python modules and scripts below ocaml/ (excluding tests)
#
ocaml:
paths: ["ocaml/**", "!**/test_*.py"]
target: 51%
threshold: 3%
#
# Python modules and scripts below python3/ (excluding tests)
#
python3:
paths: ["python3/**", "!**/test_*.py"]
target: 48%
threshold: 2%
#
# Test files
#
tests:
# Ensure that all tests are executed (tests themselves must be 100% covered)
target: 98%
paths: ["python3/tests/test_*.py"]
#
# Components:
# -----------
# Components can be selected in the Codecov Web interface then looking at one PR:
# https://app.codecov.io/gh/xapi-project/xen-api/pulls
#
component_management:
default_rules: # default rules that will be inherited by all components
statuses:
- type: project
# `auto` will use the coverage from the base commit (pull request base
# or parent commit) coverage to compare against.
target: 48
threshold: 2%
- type: patch
target: 80
threshold: 5%
individual_components:
- component_id: ocaml
name: ocaml
paths: ["ocaml/**", "!**/test_*.py"]
- component_id: ocaml/xapi-storage
name: ocaml/xapi-storage
paths:
- "ocaml/xapi-storage/**"
- "ocaml/xapi-storage-script/**"
- "!**/test_*.py"
- component_id: python3
name: python3
paths: ["python3/**", "!**/test_*.py"]
- component_id: test_cases
name: test_cases
paths: ["python3/tests/test_*.py"]