Removed method to change code coverage #11
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: .NET Core - Coverlet - Local tool | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.x | |
dotnet-quality: 'ga' | |
- name: Restore local tools | |
run: dotnet tool restore | |
- name: Build with dotnet | |
run: dotnet build | |
working-directory: BusinessTest_NetCore | |
- name: Run tests with coverage | |
run: dotnet test --no-build --collect:"XPlat Code Coverage" | |
working-directory: BusinessTest_NetCore | |
- name: Restore coverage history | |
uses: actions/download-artifact@v2 | |
with: | |
name: CoverageHistory | |
path: CoverageHistory | |
continue-on-error: true | |
- name: Create coverage report | |
run: dotnet reportgenerator "-reports:*Test*/TestResults/*/coverage.cobertura.xml" "-targetdir:CoverageReports" "-historydir:CoverageHistory" "-reporttypes:Html;Cobertura" | |
- name: Upload coverage report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: CoverageReports | |
path: CoverageReports | |
- name: Upload coverage history | |
uses: actions/upload-artifact@v2 | |
with: | |
name: CoverageHistory | |
path: CoverageHistory |