|
| 1 | +# (mandatory) |
| 2 | +# Path to coverage profile file (output of `go test -coverprofile` command). |
| 3 | +# |
| 4 | +# For cases where there are many coverage profiles, such as when running |
| 5 | +# unit tests and integration tests separately, you can combine all those |
| 6 | +# profiles into one. In this case, the profile should have a comma-separated list |
| 7 | +# of profile files, e.g., 'cover_unit.out,cover_integration.out'. |
| 8 | +profile: cover.out |
| 9 | + |
| 10 | +# Holds coverage thresholds percentages, values should be in range [0-100]. |
| 11 | +threshold: |
| 12 | + # (optional; default 0) |
| 13 | + # Minimum coverage percentage required for individual files. |
| 14 | + file: 70 |
| 15 | + |
| 16 | + # (optional; default 0) |
| 17 | + # Minimum coverage percentage required for each package. |
| 18 | + package: 80 |
| 19 | + |
| 20 | + # (optional; default 0) |
| 21 | + # Minimum overall project coverage percentage required. |
| 22 | + total: 95 |
| 23 | + |
| 24 | +# Holds regexp rules which will override thresholds for matched files or packages |
| 25 | +# using their paths. |
| 26 | +# |
| 27 | +# First rule from this list that matches file or package is going to apply |
| 28 | +# new threshold to it. If project has multiple rules that match same path, |
| 29 | +# override rules should be listed in order from specific to more general rules. |
| 30 | +override: |
| 31 | + # Increase coverage threshold to 100% for `foo` package |
| 32 | + # (default is 80, as configured above in this example). |
| 33 | + - path: ^pkg/lib/foo$ |
| 34 | + threshold: 100 |
| 35 | + |
| 36 | +# Holds regexp rules which will exclude matched files or packages |
| 37 | +# from coverage statistics. |
| 38 | +exclude: |
| 39 | + # Exclude files or packages matching their paths |
| 40 | + paths: |
| 41 | + - \.pb\.go$ # excludes all protobuf generated files |
| 42 | + - ^pkg/bar # exclude package `pkg/bar` |
| 43 | + |
| 44 | +# File name of go-test-coverage breakdown file, which can be used to |
| 45 | +# analyze coverage difference. |
| 46 | +breakdown-file-name: '' |
| 47 | + |
| 48 | +diff: |
| 49 | + # File name of go-test-coverage breakdown file which will be used to |
| 50 | + # report coverage difference. |
| 51 | + base-breakdown-file-name: '' |
0 commit comments