forked from xenserver/status-report
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.codecov.yml
166 lines (150 loc) · 4.77 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
# 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 even when other CI steps fail:
#
require_ci_to_pass: false
notify:
wait_for_ci: true
github_checks:
#
# On 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: true
#
# 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: false
#
# Coverage limits and display details:
# ------------------------------------
#
coverage:
#
# Number of precision digits when showing coverage percentage e.g. 88.8%.
# One precision digit is also used by coverage.py when reporting coverage:
#
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
#
# Project limits
# --------------
# These checks are relative to the sum of all lines of code in total
project:
default:
#
# removed_code_behavior: Set it so that as long the patch is fully covered,
#
# https://about.codecov.io/blog/new-codecov-setting-removed-code-behavior/
# https://docs.codecov.com/docs/commit-status#removed_code_behavior
#
removed_code_behavior: adjust_base # off, removals_only, fully_covered_patch
# The above defaults apply to each of these, unless overridden here:
#
tool-py2: # declare a new status context "tool-py2"
paths: ["xen-bugtool"]
flags: ["python2.7"]
tool-py3: # declare a new status context "tool-py3"
paths: ["xen-bugtool"]
flags: ["python3.10"]
tests-py2:
paths: ["tests/**/test_*.py"]
flags: ["python2.7"]
tests-py3:
paths: ["tests/**/test_*.py"]
flags: ["python3.10"]
#
# Patch limits
# ------------
# These checks are relative to the changed lines of a PR
#
patch:
default:
#
# Coverage should not be reduced below current base:
#
target: auto
#
# Don't allow to reduce coverage by default
#
threshold: 0%
# The above defaults apply to each of these, unless overridden here:
script-py2:
paths: ["xen-bugtool"]
flags: ["python2.7"]
script-py3:
paths: ["xen-bugtool"]
flags: ["python3.10"]
tests-py2:
paths: ["tests/**/test_*.py"]
flags: ["python2.7"]
tests-py3:
paths: ["tests/**/test_*.py"]
flags: ["python3.10"]