Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
sungam3r committed Dec 1, 2024
1 parent e8261cc commit 8a6e98f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ jobs:
shell: pwsh
run: |
./Build.ps1
- name: Upload coverage to codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: .coverage/*.opencover.xml
2 changes: 1 addition & 1 deletion Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ try {

Write-Output "build: Testing project in $test"

& dotnet test -c Release --no-build --no-restore
& dotnet test -c Release --no-build --no-restore -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:CoverletOutput=.coverage/
if ($LASTEXITCODE -ne 0) { throw "Testing failed" }

Pop-Location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="PublicApiGenerator" Version="11.1.0" />
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 8a6e98f

Please sign in to comment.