Skip to content

Commit ac37b8e

Browse files
committed
prepare v1.1.0-beta release
1 parent 7a76884 commit ac37b8e

File tree

3 files changed

+33
-10
lines changed

3 files changed

+33
-10
lines changed

README.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A GitHub Action that reads Cobertura format code coverage files from your test s
44

55
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.
66

7-
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 seperate job with a Linux runner to generate the summary.
7+
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.
88

99
## Inputs
1010

@@ -19,12 +19,30 @@ Note: Coverlet creates the coverage file in a random named directory (guid) so y
1919

2020
Include a badge reporting the Line Rate coverage in the output using [shields.io](https://shields.io/) - `true` or `false` (default).
2121

22-
If the overall Line Rate is less than 50% the badge will be red, if it is 50% - 74% it will be yellow and if it is 75% or over it will be green.
22+
If the overall Line Rate is less than the lower threshold (50%) the badge will be red, if it is between thresholds it will be yellow and if it greater than or equal to the higher threshold (75%) it will be green. See [`thresholds`](#thresholds) to change these values.
23+
24+
#### `fail_below_min`
25+
**v1.1.0-beta only**
26+
27+
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).
2328

2429
#### `format`
2530

2631
Output Format - `markdown` or `text` (default).
2732

33+
#### `indicators`
34+
**v1.1.0-beta only**
35+
36+
Include health indicators in the output - `true` (default) or `false`.'
37+
38+
Line Rate | Indicator
39+
--------- | ---------
40+
less than lower threshold (50%) | ❌
41+
between thresholds (50% - 74%) | ➖
42+
equal or greater than upper threshold (75%) | ✔
43+
44+
See [`thresholds`](#thresholds) to change these values.
45+
2846
#### `output`
2947

3048
Output Type - `console` (default), `file` or `both`.
@@ -35,16 +53,21 @@ Output Type - `console` (default), `file` or `both`.
3553

3654
`both` will output the coverage summary to the Action log and a file as above.
3755

56+
#### `thresholds`
57+
**v1.1.0-beta only**
58+
59+
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'`.
60+
3861
## Outputs
3962

4063
#### Text Example
4164
```
42-
https://img.shields.io/badge/Code%20Coverage-77%25-success?style=flat
43-
Line Rate = 77%, Lines Covered = 1107 / 1433
44-
Branch Rate = 60%, Branches Covered = 321 / 532
45-
Complexity = 917
46-
Company.Example: Line Rate = 78%, Branch Rate = 60%, Complexity = 906
47-
Company.Example.Library: Line Rate = 27%, Branch Rate = 100%, Complexity = 11
65+
https://img.shields.io/badge/Code%20Coverage-83%25-success?style=flat
66+
67+
Company.Example: Line Rate = 83%, Branch Rate = 69%, Complexity = 671, ✔
68+
Company.Example.Library: Line Rate = 27%, Branch Rate = 100%, Complexity = 11, ❌
69+
Summary: Line Rate = 83% (1212 / 1460), Branch Rate = 69% (262 / 378), Complexity = 682, ✔
70+
Minimum allowed line rate is 50%
4871
```
4972

5073
#### Markdown Example

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ inputs:
3434
default: '50 75'
3535
runs:
3636
using: 'docker'
37-
image: 'docker://ghcr.io/irongut/codecoveragesummary:v1.0.5'
37+
image: 'docker://ghcr.io/irongut/codecoveragesummary:v1.1.0-beta'
3838
args:
3939
- ${{ inputs.filename }}
4040
- '--badge'

src/CodeCoverageSummary/CodeCoverageSummary.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<RepositoryUrl>https://github.com/irongut/CodeCoverageSummary</RepositoryUrl>
1515
<RepositoryType>git</RepositoryType>
1616
<PackageTags>coverage test-coverage cobertura action code-coverage coverlet github-actions</PackageTags>
17-
<Version>1.0.5</Version>
17+
<Version>1.1.0</Version>
1818
</PropertyGroup>
1919

2020
<ItemGroup>

0 commit comments

Comments
 (0)