Skip to content

Commit

Permalink
chore: add test report (#1225)
Browse files Browse the repository at this point in the history
  • Loading branch information
latonz authored Apr 9, 2024
1 parent 5324612 commit 47062c3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,21 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
- run: dotnet build /p:TreatWarningsAsErrors=true
- run: dotnet test --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
- run: dotnet test --no-build --logger 'junit' /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
- uses: test-summary/action@v2
if: always()
with:
paths: 'test/**/TestResults/**/*.xml'
- uses: danielpalme/ReportGenerator-GitHub-Action@5
if: always()
with:
reports: 'test/**/*cobertura.xml'
reporttypes: 'Cobertura'
targetdir: '${{ github.workspace }}'
- uses: clearlyip/code-coverage-report-action@v4
id: code_coverage_report_action
# dont run for dependabot
if: ${{ github.actor != 'dependabot[bot]'}}
if: always() && ${{ github.actor != 'dependabot[bot]'}}
with:
filename: 'Cobertura.xml'
overall_coverage_fail_threshold: 75
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ obj/
# dot user settings
*.DotSettings.user

# test logs
**/TestResults/**/*.xml

# code coverage results
*.coverage
*.coveragexml
Expand Down
1 change: 1 addition & 0 deletions test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<PackageReference Include="Meziantou.Xunit.ParallelTestFramework" Version="2.1.0"/>
<PackageReference Include="Verify.XUnit" Version="23.4.0" />
<PackageReference Include="Verify.DiffPlex" Version="2.3.0" />
<PackageReference Include="JunitXml.TestLogger" Version="3.1.12" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.17">
<PrivateAssets>all</PrivateAssets>
Expand Down

0 comments on commit 47062c3

Please sign in to comment.