TLY bugfix #175
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Coverage Report | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, synchronize, reopened] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_PACKAGE_USER_NAME: ${{ github.actor }} | |
GITHUB_PACKAGE_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
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 |