Skip to content

Commit e5cd89f

Browse files
authored
Add code coverage (#85)
1 parent 2fd441e commit e5cd89f

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,14 @@ jobs:
5858
run: dotnet build --no-restore -c Debug
5959
- name: Test solution [Debug]
6060
working-directory: src
61-
run: dotnet test --no-restore -p:CollectCoverage=true
61+
run: dotnet test --no-restore -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:CoverletOutput=../.coverage/
6262
- name: Upload coverage to codecov
6363
if: ${{ startsWith(matrix.os, 'ubuntu') }}
6464
uses: codecov/codecov-action@v3
65+
env:
66+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
6567
with:
66-
files: .coverage/Destructurama.ByIgnoring.Tests/coverage.net8.opencover.xml
68+
files: src/.coverage/*.opencover.xml
6769

6870
buildcheck:
6971
needs:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

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

src/Destructurama.Attributed.Tests/Destructurama.Attributed.Tests.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
<PackageReference Include="Serilog" Version="3.1.1" />
1414
<PackageReference Include="Shouldly" Version="4.2.1" />
1515
<PackageReference Include="PublicApiGenerator" Version="11.1.0" />
16+
<PackageReference Include="coverlet.msbuild" Version="6.0.0">
17+
<PrivateAssets>all</PrivateAssets>
18+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
19+
</PackageReference>
1620
<!--<PackageReference Include="MarkdownSnippets.MsBuild" Version="24.5.1" PrivateAssets="all" />-->
1721
</ItemGroup>
1822

0 commit comments

Comments
 (0)