|
| 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: 90 |
| 15 | + |
| 16 | + # (optional; default 0) |
| 17 | + # Minimum coverage percentage required for each package. |
| 18 | + package: 90 |
| 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 | +# (optional; default false) |
| 45 | +# When true, requires all coverage-ignore annotations to include explanatory comments |
| 46 | +force-annotation-comment: false |
| 47 | + |
| 48 | +# If specified, saves the current test coverage breakdown to this file. |
| 49 | +# |
| 50 | +# Typically, this breakdown is generated only for main (base) branches and |
| 51 | +# stored as an artifact. Later, this file can be used in feature branches |
| 52 | +# to compare test coverage against the base branch. |
| 53 | +breakdown-file-name: '' |
| 54 | + |
| 55 | +diff: |
| 56 | + # Path to the test coverage breakdown file from the base branch. |
| 57 | + # |
| 58 | + # This file is usually generated and stored in the main (base) branch, |
| 59 | + # controled via `breakdown-file-name` property. |
| 60 | + # When set in a feature branch, it allows the tool to compute and report |
| 61 | + # the coverage difference between the current (feature) branch and the base. |
| 62 | + base-breakdown-file-name: '' |
| 63 | + |
| 64 | + # Allowed threshold for the test coverage difference (in percentage) |
| 65 | + # between the feature branch and the base branch. |
| 66 | + # |
| 67 | + # By default, this is disabled (set to null). Valid values range from |
| 68 | + # -100.0 to +100.0. |
| 69 | + # |
| 70 | + # Example: |
| 71 | + # If set to 0.5, an error will be reported if the feature branch has |
| 72 | + # less than 0.5% more coverage than the base. |
| 73 | + # |
| 74 | + # If set to -0.5, the check allows up to 0.5% less coverage than the base. |
| 75 | + threshold: null |
0 commit comments