-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.testcoverage.yml
More file actions
76 lines (67 loc) · 2.81 KB
/
Copy path.testcoverage.yml
File metadata and controls
76 lines (67 loc) · 2.81 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
# (mandatory)
# Path to coverage profile file (output of `go test -coverprofile` command).
#
# For cases where there are many coverage profiles, such as when running
# unit tests and integration tests separately, you can combine all those
# profiles into one. In this case, the profile should have a comma-separated list
# of profile files, e.g., 'cover_unit.out,cover_integration.out'.
profile: cover.out
# Holds coverage thresholds percentages, values should be in range [0-100].
threshold:
# (optional; default 0)
# Minimum coverage percentage required for individual files.
file: 70
# (optional; default 0)
# Minimum coverage percentage required for each package.
package: 80
# (optional; default 0)
# Minimum overall project coverage percentage required.
total: 80
# Holds regexp rules which will override thresholds for matched files or packages
# using their paths.
#
# First rule from this list that matches file or package is going to apply
# new threshold to it. If project has multiple rules that match same path,
# override rules should be listed in order from specific to more general rules.
override:
# Increase coverage threshold to 100% for `foo` package
# (default is 80, as configured above in this example).
- path: ^pkg/lib/foo$
threshold: 100
# Holds regexp rules which will exclude matched files or packages
# from coverage statistics.
exclude:
# Exclude files or packages matching their paths
paths:
- \.pb\.go$ # excludes all protobuf generated files
- ^pkg/bar # exclude package `pkg/bar`
- cmd/scdl
# (optional; default false)
# When true, requires all coverage-ignore annotations to include explanatory comments
force-annotation-comment: false
# If specified, saves the current test coverage breakdown to this file.
#
# Typically, this breakdown is generated only for main (base) branches and
# stored as an artifact. Later, this file can be used in feature branches
# to compare test coverage against the base branch.
breakdown-file-name: ''
diff:
# Path to the test coverage breakdown file from the base branch.
#
# This file is usually generated and stored in the main (base) branch,
# controled via `breakdown-file-name` property.
# When set in a feature branch, it allows the tool to compute and report
# the coverage difference between the current (feature) branch and the base.
base-breakdown-file-name: ''
# Allowed threshold for the test coverage difference (in percentage)
# between the feature branch and the base branch.
#
# By default, this is disabled (set to null). Valid values range from
# -100.0 to +100.0.
#
# Example:
# If set to 0.5, an error will be reported if the feature branch has
# less than 0.5% more coverage than the base.
#
# If set to -0.5, the check allows up to 0.5% less coverage than the base.
threshold: null