mirror of
https://github.com/irongut/CodeCoverageSummary.git
synced 2026-05-15 06:30:14 +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
|
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||||
if: contains(github.event.issue.labels.*.name, 'bug')
|
if: contains(github.event.issue.labels.*.name, 'bug')
|
||||||
with:
|
with:
|
||||||
project: 'https://github.com/irongut/EDlib/projects/1'
|
project: 'https://github.com/irongut/CodeCoverageSummary/projects/1'
|
||||||
column_name: 'Needs triage'
|
column_name: 'Needs triage'
|
||||||
|
|
||||||
- name: Assign Issues to Enhancements
|
- name: Assign Issues to Enhancements
|
||||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||||
if: contains(github.event.issue.labels.*.name, 'enhancement')
|
if: contains(github.event.issue.labels.*.name, 'enhancement')
|
||||||
with:
|
with:
|
||||||
project: 'https://github.com/irongut/EDlib/projects/2'
|
project: 'https://github.com/irongut/CodeCoverageSummary/projects/2'
|
||||||
column_name: 'To do'
|
column_name: 'To do'
|
||||||
|
|
||||||
- name: Assign PRs to Bugs
|
- name: Assign PRs to Bugs
|
||||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||||
if: contains(github.event.pull_request.labels.*.name, 'bug')
|
if: contains(github.event.pull_request.labels.*.name, 'bug')
|
||||||
with:
|
with:
|
||||||
project: 'https://github.com/irongut/EDlib/projects/1'
|
project: 'https://github.com/irongut/CodeCoverageSummary/projects/1'
|
||||||
column_name: 'In Progress'
|
column_name: 'In Progress'
|
||||||
|
|
||||||
- name: Assign PRs to Enhancements
|
- name: Assign PRs to Enhancements
|
||||||
uses: srggrs/assign-one-project-github-action@1.3.1
|
uses: srggrs/assign-one-project-github-action@1.3.1
|
||||||
if: contains(github.event.pull_request.labels.*.name, 'enhancement')
|
if: contains(github.event.pull_request.labels.*.name, 'enhancement')
|
||||||
with:
|
with:
|
||||||
project: 'https://github.com/irongut/EDlib/projects/2'
|
project: 'https://github.com/irongut/CodeCoverageSummary/projects/2'
|
||||||
column_name: 'In Progress'
|
column_name: 'In Progress'
|
||||||
|
|||||||
@@ -2,7 +2,10 @@
|
|||||||
# https://github.com/samspills/assign-pr-to-author
|
# https://github.com/samspills/assign-pr-to-author
|
||||||
|
|
||||||
name: Auto Assign PR
|
name: Auto Assign PR
|
||||||
on: [pull_request]
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
assignAuthor:
|
assignAuthor:
|
||||||
@@ -10,6 +13,5 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Auto Assign PR
|
- name: Auto Assign PR
|
||||||
uses: samspills/assign-pr-to-author@v1.0.1
|
uses: samspills/assign-pr-to-author@v1.0.1
|
||||||
if: github.event_name == 'pull_request' && github.event.action == 'opened'
|
|
||||||
with:
|
with:
|
||||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
|||||||
@@ -13,8 +13,12 @@ jobs:
|
|||||||
- name: Test Action
|
- name: Test Action
|
||||||
uses: irongut/CodeCoverageSummary@master
|
uses: irongut/CodeCoverageSummary@master
|
||||||
with:
|
with:
|
||||||
filename: '/app/sample.coverage.xml'
|
filename: /app/sample.coverage.xml,/app/sample.coverage.xml
|
||||||
badge: true
|
badge: true
|
||||||
format: 'md'
|
|
||||||
fail_below_min: true
|
fail_below_min: true
|
||||||
|
format: markdown
|
||||||
|
hide_branch_rate: false
|
||||||
|
hide_complexity: true
|
||||||
|
indicators: true
|
||||||
|
output: both
|
||||||
thresholds: '60 80'
|
thresholds: '60 80'
|
||||||
|
|||||||
@@ -14,5 +14,12 @@ jobs:
|
|||||||
- name: Test Action
|
- name: Test Action
|
||||||
uses: irongut/CodeCoverageSummary@master
|
uses: irongut/CodeCoverageSummary@master
|
||||||
with:
|
with:
|
||||||
filename: '/app/sample.coverage.xml'
|
filename: /app/sample.coverage.xml,/app/sample.coverage.xml
|
||||||
badge: 'true'
|
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
|
- name: Test Action
|
||||||
uses: irongut/CodeCoverageSummary@master
|
uses: irongut/CodeCoverageSummary@master
|
||||||
with:
|
with:
|
||||||
filename: '/app/sample.coverage.xml'
|
filename: /app/sample.coverage.xml,/app/sample.coverage.xml
|
||||||
badge: 'true'
|
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`
|
### `filename`
|
||||||
**Required**
|
**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 Workflow Example](#net-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 5 Workflow Example](#net-5-workflow-example) below.
|
|
||||||
|
|
||||||
|
|
||||||
### `badge`
|
### `badge`
|
||||||
@@ -55,13 +53,11 @@ Output Format - `markdown` or `text` (default).
|
|||||||
|
|
||||||
|
|
||||||
### `hide_branch_rate`
|
### `hide_branch_rate`
|
||||||
**v1.2.0-beta only**
|
|
||||||
|
|
||||||
Hide Branch Rate values in the output - `true` or `false` (default).
|
Hide Branch Rate values in the output - `true` or `false` (default).
|
||||||
|
|
||||||
|
|
||||||
### `hide_complexity`
|
### `hide_complexity`
|
||||||
**v1.2.0-beta only**
|
|
||||||
|
|
||||||
Hide Complexity values in the output - `true` or `false` (default).
|
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 | 83% | 69% | 671 | ✔
|
||||||
> Company.Example.Library | 27% | 100% | 11 | ❌
|
> Company.Example.Library | 27% | 100% | 11 | ❌
|
||||||
> **Summary** | **83%** (1212 / 1460) | **69%** (262 / 378) | 682 | ✔
|
> **Summary** | **83%** (1212 / 1460) | **69%** (262 / 378) | 682 | ✔
|
||||||
|
>
|
||||||
|
> _Minimum allowed line rate is `50%`_
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: Code Coverage Summary Report
|
name: Code Coverage Summary Report
|
||||||
uses: irongut/CodeCoverageSummary@v1.1.0
|
uses: irongut/CodeCoverageSummary@v1.2.0
|
||||||
with:
|
with:
|
||||||
filename: coverage/coverage.cobertura.xml
|
filename: coverage.cobertura.xml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### .Net 5 Workflow Example
|
### .Net Workflow Example
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: .Net 5 CI Build
|
name: .Net 6 CI Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -151,7 +149,7 @@ jobs:
|
|||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
with:
|
with:
|
||||||
dotnet-version: 5.0.x
|
dotnet-version: 6.0.x
|
||||||
|
|
||||||
- name: Restore Dependencies
|
- name: Restore Dependencies
|
||||||
run: dotnet restore src/Example.sln
|
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
|
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
|
- 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
|
- name: Code Coverage Summary Report
|
||||||
uses: irongut/CodeCoverageSummary@v1.1.0
|
uses: irongut/CodeCoverageSummary@v1.2.0
|
||||||
with:
|
with:
|
||||||
filename: coverage/coverage.cobertura.xml
|
filename: coverage.cobertura.xml
|
||||||
badge: true
|
badge: true
|
||||||
fail_below_min: true
|
fail_below_min: true
|
||||||
format: 'markdown'
|
format: markdown
|
||||||
output: 'both'
|
hide_branch_rate: false
|
||||||
thresholds: '70 80'
|
hide_complexity: true
|
||||||
|
indicators: true
|
||||||
|
output: both
|
||||||
|
thresholds: '60 80'
|
||||||
|
|
||||||
- name: Add Coverage PR Comment
|
- name: Add Coverage PR Comment
|
||||||
uses: marocchino/sticky-pull-request-comment@v2
|
uses: marocchino/sticky-pull-request-comment@v2
|
||||||
|
|||||||
+1
-1
@@ -42,7 +42,7 @@ inputs:
|
|||||||
default: '50 75'
|
default: '50 75'
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'docker://ghcr.io/irongut/codecoveragesummary:v1.2.0-beta'
|
image: 'docker://ghcr.io/irongut/codecoveragesummary:v1.2.0'
|
||||||
args:
|
args:
|
||||||
- '--files'
|
- '--files'
|
||||||
- ${{ inputs.filename }}
|
- ${{ inputs.filename }}
|
||||||
|
|||||||
Reference in New Issue
Block a user