Skip to content

Commit

Permalink
add coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsonax committed Dec 7, 2024
1 parent b73d70a commit 6eca0d2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,12 @@ jobs:
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
working-directory: Tests/CleanAspCore.Api.Tests
run: >
dotnet test
dotnet run
--no-build
--configuration Release
--verbosity normal
--logger GitHubActions
--
RunConfiguration.CollectSourceInformation=true
--report-trx
- name: dotnet publish
working-directory: CleanAspCore.Api
run: dotnet publish --no-build -c Release -o ${{env.DOTNET_ROOT}}/myapp
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,28 @@ jobs:
--no-build
--configuration Release
--coverage
--coverage-output-format cobertura
--report-trx
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
**/*.trx
- name: Code Coverage Report
uses: irongut/[email protected]
with:
filename: "**/*.cobertura.xml"
badge: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both

- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md

0 comments on commit 6eca0d2

Please sign in to comment.