Skip to content

Commit

Permalink
Add code coverage (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
sungam3r authored Jan 22, 2024
1 parent 2fd441e commit e5cd89f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@ jobs:
run: dotnet build --no-restore -c Debug
- name: Test solution [Debug]
working-directory: src
run: dotnet test --no-restore -p:CollectCoverage=true
run: dotnet test --no-restore -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:CoverletOutput=../.coverage/
- name: Upload coverage to codecov
if: ${{ startsWith(matrix.os, 'ubuntu') }}
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: .coverage/Destructurama.ByIgnoring.Tests/coverage.net8.opencover.xml
files: src/.coverage/*.opencover.xml

buildcheck:
needs:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![License](https://img.shields.io/github/license/destructurama/attributed)

[![codecov](https://codecov.io/gh/destructurama/attributed/branch/master/graph/badge.svg?token=0ZRHIUEQM4)](https://codecov.io/gh/destructurama/attributed)
[![codecov](https://codecov.io/gh/destructurama/attributed/graph/badge.svg?token=Ma2sUoqqb1)](https://codecov.io/gh/destructurama/attributed)
[![Nuget](https://img.shields.io/nuget/dt/Destructurama.Attributed)](https://www.nuget.org/packages/Destructurama.Attributed)
[![Nuget](https://img.shields.io/nuget/v/Destructurama.Attributed)](https://www.nuget.org/packages/Destructurama.Attributed)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<PackageReference Include="Serilog" Version="3.1.1" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="PublicApiGenerator" Version="11.1.0" />
<PackageReference Include="coverlet.msbuild" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<!--<PackageReference Include="MarkdownSnippets.MsBuild" Version="24.5.1" PrivateAssets="all" />-->
</ItemGroup>

Expand Down

0 comments on commit e5cd89f

Please sign in to comment.