mirror of
https://github.com/irongut/CodeCoverageSummary.git
synced 2026-05-14 06:00:13 +02:00
Compare commits
4 Commits
v1.2.0-beta
...
v1.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 5088d5eb31 | |||
| ee53bdd6c5 | |||
| 6a542ff4b0 | |||
| 46bc9869d5 |
@@ -17,26 +17,26 @@ jobs:
|
||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||
if: contains(github.event.issue.labels.*.name, 'bug')
|
||||
with:
|
||||
project: 'https://github.com/irongut/EDlib/projects/1'
|
||||
project: 'https://github.com/irongut/CodeCoverageSummary/projects/1'
|
||||
column_name: 'Needs triage'
|
||||
|
||||
- name: Assign Issues to Enhancements
|
||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||
if: contains(github.event.issue.labels.*.name, 'enhancement')
|
||||
with:
|
||||
project: 'https://github.com/irongut/EDlib/projects/2'
|
||||
project: 'https://github.com/irongut/CodeCoverageSummary/projects/2'
|
||||
column_name: 'To do'
|
||||
|
||||
- name: Assign PRs to Bugs
|
||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||
if: contains(github.event.pull_request.labels.*.name, 'bug')
|
||||
with:
|
||||
project: 'https://github.com/irongut/EDlib/projects/1'
|
||||
project: 'https://github.com/irongut/CodeCoverageSummary/projects/1'
|
||||
column_name: 'In Progress'
|
||||
|
||||
- name: Assign PRs to Enhancements
|
||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||
if: contains(github.event.pull_request.labels.*.name, 'enhancement')
|
||||
with:
|
||||
project: 'https://github.com/irongut/EDlib/projects/2'
|
||||
project: 'https://github.com/irongut/CodeCoverageSummary/projects/2'
|
||||
column_name: 'In Progress'
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
# https://github.com/samspills/assign-pr-to-author
|
||||
|
||||
name: Auto Assign PR
|
||||
on: [pull_request]
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
assignAuthor:
|
||||
@@ -10,6 +13,5 @@ jobs:
|
||||
steps:
|
||||
- name: Auto Assign PR
|
||||
uses: samspills/assign-pr-to-author@v1.0.1
|
||||
if: github.event_name == 'pull_request' && github.event.action == 'opened'
|
||||
with:
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
|
||||
@@ -13,8 +13,12 @@ jobs:
|
||||
- name: Test Action
|
||||
uses: irongut/CodeCoverageSummary@master
|
||||
with:
|
||||
filename: '/app/sample.coverage.xml'
|
||||
filename: /app/sample.coverage.xml,/app/sample.coverage.xml
|
||||
badge: true
|
||||
format: 'md'
|
||||
fail_below_min: true
|
||||
format: markdown
|
||||
hide_branch_rate: false
|
||||
hide_complexity: true
|
||||
indicators: true
|
||||
output: both
|
||||
thresholds: '60 80'
|
||||
|
||||
@@ -14,5 +14,12 @@ jobs:
|
||||
- name: Test Action
|
||||
uses: irongut/CodeCoverageSummary@master
|
||||
with:
|
||||
filename: '/app/sample.coverage.xml'
|
||||
badge: 'true'
|
||||
filename: /app/sample.coverage.xml,/app/sample.coverage.xml
|
||||
badge: true
|
||||
fail_below_min: true
|
||||
format: markdown
|
||||
hide_branch_rate: false
|
||||
hide_complexity: true
|
||||
indicators: true
|
||||
output: both
|
||||
thresholds: '60 80'
|
||||
|
||||
@@ -14,5 +14,12 @@ jobs:
|
||||
- name: Test Action
|
||||
uses: irongut/CodeCoverageSummary@master
|
||||
with:
|
||||
filename: '/app/sample.coverage.xml'
|
||||
badge: 'true'
|
||||
filename: /app/sample.coverage.xml,/app/sample.coverage.xml
|
||||
badge: true
|
||||
fail_below_min: true
|
||||
format: markdown
|
||||
hide_branch_rate: false
|
||||
hide_complexity: true
|
||||
indicators: true
|
||||
output: both
|
||||
thresholds: '60 80'
|
||||
|
||||
@@ -24,11 +24,9 @@ As a Docker based action Code Coverage Summary requires a Linux runner, see [Typ
|
||||
### `filename`
|
||||
**Required**
|
||||
|
||||
Code coverage file to analyse.
|
||||
A comma separated list of code coverage files to analyse. If there are any spaces in a path or filename this value must be in quotes.
|
||||
|
||||
**v1.2.0-beta only:** A comma separated list of code coverage files to analyse.
|
||||
|
||||
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.
|
||||
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](#net-workflow-example) below.
|
||||
|
||||
|
||||
### `badge`
|
||||
@@ -55,13 +53,11 @@ Output Format - `markdown` or `text` (default).
|
||||
|
||||
|
||||
### `hide_branch_rate`
|
||||
**v1.2.0-beta only**
|
||||
|
||||
Hide Branch Rate values in the output - `true` or `false` (default).
|
||||
|
||||
|
||||
### `hide_complexity`
|
||||
**v1.2.0-beta only**
|
||||
|
||||
Hide Complexity values in the output - `true` or `false` (default).
|
||||
|
||||
@@ -117,22 +113,24 @@ Minimum allowed line rate is 50%
|
||||
> 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%`_
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```yaml
|
||||
name: Code Coverage Summary Report
|
||||
uses: irongut/CodeCoverageSummary@v1.1.0
|
||||
uses: irongut/CodeCoverageSummary@v1.2.0
|
||||
with:
|
||||
filename: coverage/coverage.cobertura.xml
|
||||
filename: coverage.cobertura.xml
|
||||
```
|
||||
|
||||
|
||||
### .Net 5 Workflow Example
|
||||
### .Net Workflow Example
|
||||
|
||||
```yaml
|
||||
name: .Net 5 CI Build
|
||||
name: .Net 6 CI Build
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -151,7 +149,7 @@ jobs:
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.0.x
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
- name: Restore Dependencies
|
||||
run: dotnet restore src/Example.sln
|
||||
@@ -163,17 +161,20 @@ jobs:
|
||||
run: dotnet test src/Example.sln --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
|
||||
|
||||
- name: Copy Coverage To Predictable Location
|
||||
run: cp coverage/**/coverage.cobertura.xml coverage/coverage.cobertura.xml
|
||||
run: cp coverage/**/coverage.cobertura.xml coverage.cobertura.xml
|
||||
|
||||
- name: Code Coverage Summary Report
|
||||
uses: irongut/CodeCoverageSummary@v1.1.0
|
||||
uses: irongut/CodeCoverageSummary@v1.2.0
|
||||
with:
|
||||
filename: coverage/coverage.cobertura.xml
|
||||
filename: coverage.cobertura.xml
|
||||
badge: true
|
||||
fail_below_min: true
|
||||
format: 'markdown'
|
||||
output: 'both'
|
||||
thresholds: '70 80'
|
||||
format: markdown
|
||||
hide_branch_rate: false
|
||||
hide_complexity: true
|
||||
indicators: true
|
||||
output: both
|
||||
thresholds: '60 80'
|
||||
|
||||
- name: Add Coverage PR Comment
|
||||
uses: marocchino/sticky-pull-request-comment@v2
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ inputs:
|
||||
default: '50 75'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'docker://ghcr.io/irongut/codecoveragesummary:v1.2.0-beta'
|
||||
image: 'docker://ghcr.io/irongut/codecoveragesummary:v1.2.0'
|
||||
args:
|
||||
- '--files'
|
||||
- ${{ inputs.filename }}
|
||||
|
||||
Reference in New Issue
Block a user