Skip to content

Commit

Permalink
Improve test report and code coverage, use codecov.io
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-jung committed Feb 18, 2024
1 parent a3cbce7 commit c63cda8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 32 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,13 @@ jobs:
- run: >-
dotnet test
-c Release --no-restore --no-build
/p:ContinuousIntegrationBuild=true
/p:CoverletOutputFormat=\"opencover,cobertura\"
-s CodeCoverage.runsettings
--logger "trx;LogFileName=test-results-${{ steps.nbgv.outputs.Version }}.trx"
--collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results
path: |
**/*.trx
**/coverage.cobertura.xml
--collect:"XPlat Code Coverage"
--logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"
--
RunConfiguration.CollectSourceInformation=true
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@5
with:
Expand All @@ -51,6 +48,12 @@ jobs:
with:
name: CoverageReport-${{ steps.nbgv.outputs.Version }}
path: coveragereport
- name: Upload coverage reports to Codecov
if: ${{ env.CODECOV_TOKEN }}
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
slug: georg-jung/FaceAiSharp
- run: dotnet pack -c Release --no-restore --no-build /p:ContinuousIntegrationBuild=true
- uses: actions/upload-artifact@v4
with:
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/test-report.yml

This file was deleted.

1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<PackageVersion Include="FaceAiSharp.Models.ArcFace.LResNet100E-IR-int8" Version="0.20230419.1" />
<PackageVersion Include="FaceAiSharp.Models.OpenVino.open-closed-eye-0001" Version="0.20220116.2" />
<PackageVersion Include="FaceONNX" Version="2.2.0.4" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.3.3" />
<PackageVersion Include="Humanizer.Core" Version="2.14.1" />
<PackageVersion Include="MathNet.Numerics" Version="5.0.0" />
<PackageVersion Include="LiteDB" Version="5.0.17" />
Expand Down
4 changes: 4 additions & 0 deletions src/FaceAiSharp.Tests/FaceAiSharp.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" />
<PackageReference Include="Shouldly" />
Expand Down

0 comments on commit c63cda8

Please sign in to comment.