Skip to content

Commit

Permalink
Setup codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
Jcparkyn committed Nov 26, 2023
1 parent 9df632e commit 545f44b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,9 @@ jobs:
run: dotnet build --no-restore -c Release /warnaserror

- name: Run Tests
run: dotnet test --no-build -c Release
run: dotnet test --no-build -c Release /p:CollectCoverage=true /p:CoverletOutputFormat=opencover

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: test
4 changes: 4 additions & 0 deletions test/Phetch.Blazor.Tests/Phetch.Blazor.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

<ItemGroup>
<PackageReference Include="bunit" Version="1.25.3" />
<PackageReference Include="coverlet.msbuild" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="FluentAssertions.Analyzers" Version="0.26.0">
<PrivateAssets>all</PrivateAssets>
Expand Down
4 changes: 4 additions & 0 deletions test/Phetch.Tests/Phetch.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.5.1" />
<PackageReference Include="FluentAssertions.Analyzers" Version="0.16.0">
<PrivateAssets>all</PrivateAssets>
Expand Down

0 comments on commit 545f44b

Please sign in to comment.