mirror of
https://github.com/irongut/CodeCoverageSummary.git
synced 2026-05-20 17:00:14 +02:00
prepare v1.1.0-beta release
This commit is contained in:
@@ -4,7 +4,7 @@ A GitHub Action that reads Cobertura format code coverage files from your test s
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
## Inputs
|
## Inputs
|
||||||
|
|
||||||
@@ -19,12 +19,30 @@ Note: Coverlet creates the coverage file in a random named directory (guid) so y
|
|||||||
|
|
||||||
Include a badge reporting the Line Rate coverage in the output using [shields.io](https://shields.io/) - `true` or `false` (default).
|
Include a badge reporting the Line Rate coverage in the output using [shields.io](https://shields.io/) - `true` or `false` (default).
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
#### `fail_below_min`
|
||||||
|
**v1.1.0-beta only**
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
#### `format`
|
#### `format`
|
||||||
|
|
||||||
Output Format - `markdown` or `text` (default).
|
Output Format - `markdown` or `text` (default).
|
||||||
|
|
||||||
|
#### `indicators`
|
||||||
|
**v1.1.0-beta only**
|
||||||
|
|
||||||
|
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`](#thresholds) to change these values.
|
||||||
|
|
||||||
#### `output`
|
#### `output`
|
||||||
|
|
||||||
Output Type - `console` (default), `file` or `both`.
|
Output Type - `console` (default), `file` or `both`.
|
||||||
@@ -35,16 +53,21 @@ Output Type - `console` (default), `file` or `both`.
|
|||||||
|
|
||||||
`both` will output the coverage summary to the Action log and a file as above.
|
`both` will output the coverage summary to the Action log and a file as above.
|
||||||
|
|
||||||
|
#### `thresholds`
|
||||||
|
**v1.1.0-beta only**
|
||||||
|
|
||||||
|
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'`.
|
||||||
|
|
||||||
## Outputs
|
## Outputs
|
||||||
|
|
||||||
#### Text Example
|
#### Text Example
|
||||||
```
|
```
|
||||||
https://img.shields.io/badge/Code%20Coverage-77%25-success?style=flat
|
https://img.shields.io/badge/Code%20Coverage-83%25-success?style=flat
|
||||||
Line Rate = 77%, Lines Covered = 1107 / 1433
|
|
||||||
Branch Rate = 60%, Branches Covered = 321 / 532
|
Company.Example: Line Rate = 83%, Branch Rate = 69%, Complexity = 671, ✔
|
||||||
Complexity = 917
|
Company.Example.Library: Line Rate = 27%, Branch Rate = 100%, Complexity = 11, ❌
|
||||||
Company.Example: Line Rate = 78%, Branch Rate = 60%, Complexity = 906
|
Summary: Line Rate = 83% (1212 / 1460), Branch Rate = 69% (262 / 378), Complexity = 682, ✔
|
||||||
Company.Example.Library: Line Rate = 27%, Branch Rate = 100%, Complexity = 11
|
Minimum allowed line rate is 50%
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Markdown Example
|
#### Markdown Example
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ inputs:
|
|||||||
default: '50 75'
|
default: '50 75'
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'docker://ghcr.io/irongut/codecoveragesummary:v1.0.5'
|
image: 'docker://ghcr.io/irongut/codecoveragesummary:v1.1.0-beta'
|
||||||
args:
|
args:
|
||||||
- ${{ inputs.filename }}
|
- ${{ inputs.filename }}
|
||||||
- '--badge'
|
- '--badge'
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<RepositoryUrl>https://github.com/irongut/CodeCoverageSummary</RepositoryUrl>
|
<RepositoryUrl>https://github.com/irongut/CodeCoverageSummary</RepositoryUrl>
|
||||||
<RepositoryType>git</RepositoryType>
|
<RepositoryType>git</RepositoryType>
|
||||||
<PackageTags>coverage test-coverage cobertura action code-coverage coverlet github-actions</PackageTags>
|
<PackageTags>coverage test-coverage cobertura action code-coverage coverlet github-actions</PackageTags>
|
||||||
<Version>1.0.5</Version>
|
<Version>1.1.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user