Skip to content

Commit

Permalink
Update coverage-report.yml (#275)
Browse files Browse the repository at this point in the history
* Update coverage-report.yml

* Update coverage-report.yml
  • Loading branch information
ArdenHide authored Jul 1, 2024
1 parent f01c733 commit d17fbb3
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/coverage-report.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build with Markdown Report
name: Coverage Report

on:
push:
Expand All @@ -12,5 +12,35 @@ env:
GITHUB_PACKAGE_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build-and-test:
uses: The-Poolz/.net-workflows/.github/workflows/coverage-report.yml@master
Coverage-Report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore

- name: Install ReportGenerator
run: dotnet tool install -g dotnet-reportgenerator-globaltool

- name: Test and Generate Report
run: |
dotnet test --no-restore --no-build --collect:"XPlat Code Coverage"
reportgenerator "-reports:**/coverage.cobertura.xml;" "-targetdir:${{github.workspace}}/report" "-reporttypes:MarkdownSummaryGithub"
- name: Comments on PR with coverage report results
uses: marocchino/sticky-pull-request-comment@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
recreate: true
header: Coverage Report
path: ${{github.workspace}}/report/SummaryGithub.md

0 comments on commit d17fbb3

Please sign in to comment.