Skip to content

Commit

Permalink
Add code covarage report and check (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
torbacz authored Sep 10, 2024
1 parent 9ee032f commit fc13170
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,27 @@ jobs:
run: dotnet build --no-restore -c Release

- name: Test
run: dotnet test --no-build -c Release --verbosity normal
continue-on-error: true
run: dotnet test --no-build -c Release --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura

- name: ReportGenerator
uses: im-open/code-coverage-report-generator@4
with:
reports: '*/**/coverage.cobertura.xml'
targetdir: './coverage-results'
title: dotnet code coverage
reporttypes: 'MarkdownSummary;'

- name: Create a status check for the code coverage results
id: dotnet-coverage-check
uses: im-open/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
summary-file: './coverage-results/Summary.md'
#create-status-check: true
create-pr-comment: true
update-comment-if-one-exists: true
update-comment-key: 'dotnet'
ignore-threshold-failures: false
line-threshold: 80
branch-threshold: 80

0 comments on commit fc13170

Please sign in to comment.