Skip to content

Commit

Permalink
Add code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
sungam3r committed Jan 22, 2024
1 parent c96dbf8 commit 0b0ae51
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/json-net)

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<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>
</ItemGroup>

<ItemGroup>
Expand Down

1 comment on commit 0b0ae51

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.01.

Benchmark suite Current: 0b0ae51 Previous: c96dbf8 Ratio
Benchmarks.JsonNetBenchmarks.Destructure 2194.973349434989 ns (± 14.048827828710992) 2165.181027003697 ns (± 7.262445439490399) 1.01

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.