-
-
Notifications
You must be signed in to change notification settings - Fork 56
Using Code Coverage Summary
name: Code Coverage Summary Report
uses: irongut/[email protected]
with:
filename: coverage.cobertura.xml
Note: Do not use the action @master
, always specify a tagged version number to avoid development changes breaking your workflow.
Required
A comma separated list of code coverage files to analyse. Also supports using glob patterns to match multiple files. If there are any spaces in a path or filename this value must be in quotes.
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 Workflow Example.
Include a badge reporting the Line Rate coverage in the output using shields.io - true
or false
(default).
Line Rate | Badge |
---|---|
less than lower threshold (50%) | |
between thresholds (50% - 74%) | |
equal or greater than upper threshold (75%) |
See thresholds
to change these values.
Fail the workflow if the overall Line Rate is below lower threshold - true
or false
(default). The default lower threshold is 50%, see thresholds
.
Output Format - markdown
or text
(default).
Hide Branch Rate metrics in the output - true
or false
(default).
Hide Complexity metrics in the output - true
or false
(default).
Include health indicators in the output - true
(default) or false
.
Line Rate | Indicator |
---|---|
less than lower threshold (50%) | ❌ |
between thresholds (50% - 74%) | ➖ |
equal or greater than upper threshold (75%) | ✔ |
See thresholds
to change these values.
Output Type - console
(default), file
or both
.
console
will output the coverage summary to the GitHub Action log.
file
will output the coverage summary to code-coverage-results.txt
for text or code-coverage-results.md
for markdown format in the workflow's working directory.
both
will output the coverage summary to the Action log and a file as above.
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'
.
https://img.shields.io/badge/Code%20Coverage-83%25-success?style=flat
Company.Example: Line Rate = 83%, Branch Rate = 69%, Complexity = 671, ✔
Company.Example.Library: Line Rate = 27%, Branch Rate = 100%, Complexity = 11, ❌
Summary: Line Rate = 83% (1212 / 1460), Branch Rate = 69% (262 / 378), Complexity = 682, ✔
Minimum allowed line rate is 50%
Package Line Rate Branch Rate Complexity Health Company.Example 83% 69% 671 ✔ Company.Example.Library 27% 100% 11 ❌ Summary 83% (1212 / 1460) 69% (262 / 378) 682 ✔ Minimum allowed line rate is
50%