You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert

12
+
13
+
</div>
14
+
3
15
A GitHub Action that reads Cobertura format code coverage files from your test suite and outputs a text or markdown summary. This summary can be posted as a Pull Request comment or included in Release Notes by other actions to give you an immediate insight into the health of your code without using a third-party site.
4
16
5
-
Code Coverage Summary is designed for use with [Coverlet](https://github.com/coverlet-coverage/coverlet) and [gcovr](https://github.com/gcovr/gcovr) but it should work with any test framework that outputs coverage in Cobertura format.
17
+
Code Coverage Summary is designed for use with [Coverlet](https://github.com/coverlet-coverage/coverlet) and [gcovr](https://github.com/gcovr/gcovr) but it should work with any test framework that outputs coverage in Cobertura format. If it doesn't work with your tooling please [open an issue][new-issue] to discuss the problem.
6
18
7
19
As a Docker based action Code Coverage Summary requires a Linux runner, see [Types of Action](https://docs.github.com/en/actions/creating-actions/about-custom-actions#types-of-actions). If you need to build with a Windows or MacOS runner a workaround would be to upload the coverage file as an artifact and use a separate job with a Linux runner to generate the summary.
8
20
21
+
9
22
## Inputs
10
23
11
24
### `filename`
12
25
**Required**
13
26
14
27
Code coverage file to analyse.
15
28
29
+
**v1.2.0-beta only:** A comma separated list of code coverage files to analyse.
30
+
16
31
Note: Coverlet creates the coverage file in a random named directory (guid) so you need to copy it to a predictable path before running this Action, see the [.Net 5 Workflow Example](#net-5-workflow-example) below.
17
32
33
+
18
34
### `badge`
19
35
20
36
Include a badge reporting the Line Rate coverage in the output using [shields.io](https://shields.io/) - `true` or `false` (default).
@@ -27,14 +43,29 @@ equal or greater than upper threshold (75%) |  to change these values.
29
45
46
+
30
47
### `fail_below_min`
31
48
32
49
Fail the workflow if the overall Line Rate is below lower threshold - `true` or `false` (default). The default lower threshold is 50%, see [`thresholds`](#thresholds).
33
50
51
+
34
52
### `format`
35
53
36
54
Output Format - `markdown` or `text` (default).
37
55
56
+
57
+
### `hide_branch_rate`
58
+
**v1.2.0-beta only**
59
+
60
+
Hide Branch Rate values in the output - `true` or `false` (default).
61
+
62
+
63
+
### `hide_complexity`
64
+
**v1.2.0-beta only**
65
+
66
+
Hide Complexity values in the output - `true` or `false` (default).
67
+
68
+
38
69
### `indicators`
39
70
40
71
Include health indicators in the output - `true` (default) or `false`.
@@ -47,6 +78,7 @@ equal or greater than upper threshold (75%) | ✔
47
78
48
79
See [`thresholds`](#thresholds) to change these values.
49
80
81
+
50
82
### `output`
51
83
52
84
Output Type - `console` (default), `file` or `both`.
@@ -57,10 +89,12 @@ Output Type - `console` (default), `file` or `both`.
57
89
58
90
`both` will output the coverage summary to the Action log and a file as above.
59
91
92
+
60
93
### `thresholds`
61
94
62
95
Lower and upper threshold percentages for badge and health indicators, lower threshold can also be used to fail the action. Separate the values with a space and enclose them in quotes; default `'50 75'`.
@@ -147,10 +192,12 @@ Please make sure the bug is not already reported by searching existing [issues].
147
192
148
193
If you're unable to find an existing issue addressing the problem please [open a new one][new-issue]. Be sure to include a title and clear description, as much relevant information as possible, a workflow sample and any logs demonstrating the problem.
149
194
195
+
150
196
### Suggest an Enhancement
151
197
152
198
Please [open a new issue][new-issue].
153
199
200
+
154
201
### Submit a Pull Request
155
202
156
203
Discuss your idea first, so that your changes have a good chance of being merged in.
@@ -159,6 +206,7 @@ Submit your pull request against the `master` branch.
159
206
160
207
Pull requests that include documentation and relevant updates to README.md are merged faster, because you won't have to wait for somebody else to complete your contribution.
161
208
209
+
162
210
## License
163
211
164
212
Code Coverage Summary is available under the MIT license, see the [LICENSE](LICENSE) file for more info.
0 commit comments