Skip to content

Commit

Permalink
Add coverlet collector to unit test as dependency; Make run script on…
Browse files Browse the repository at this point in the history
…eliner (just for safety)
  • Loading branch information
wdolek committed Sep 8, 2020
1 parent 4b707e2 commit 2d0593c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/cover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,11 @@ jobs:
working-directory: test/W4k.AspNetCore.Correlator.UnitTests

- name: Test coverage
run: >
dotnet test
/p:CollectCoverage=true
/p:CoverletOutputFormat=cobertura
/p:Exclude="[xunit*]\*"
/p:CoverletOutput=./TestResults/
run: dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:Exclude="[xunit*]\*" /p:CoverletOutput=./TestResults/
working-directory: test/W4k.AspNetCore.Correlator.UnitTests

- name: Generate report
run: >
reportgenerator
-reports:TestResults/coverage.cobertura.xml
-targetdir:./TestResults/html
-reporttypes:HTML
run: reportgenerator -reports:TestResults/coverage.cobertura.xml -targetdir:./TestResults/html -reporttypes:HTML
working-directory: test/W4k.AspNetCore.Correlator.UnitTests

- name: Upload artifact
Expand Down
1 change: 1 addition & 0 deletions W4k.AspNetCore.Correlator.sln
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{59A6F617-4EF1-40BD-8759-280E90DDB789}"
ProjectSection(SolutionItems) = preProject
.github\workflows\ci.yml = .github\workflows\ci.yml
.github\workflows\cover.yml = .github\workflows\cover.yml
.github\workflows\pack.yml = .github\workflows\pack.yml
EndProjectSection
EndProject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="1.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="2.9.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit 2d0593c

Please sign in to comment.