Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,15 @@ jobs:
- name: Build
run: dotnet build --no-restore -c Release

- name: Test
run: dotnet test --no-build -c Release --verbosity normal
- name: Test with Coverage
run: |
dotnet tool install -g dotnet-coverage
dotnet-coverage collect -s coverage.runsettings -f cobertura -o ./coverage/coverage.cobertura.xml "dotnet test --no-build -c Release --verbosity normal"

- name: Generate Coverage Report
run: |
dotnet tool install -g dotnet-reportgenerator-globaltool
reportgenerator -reports:./coverage/coverage.cobertura.xml -targetdir:./coverage/report -reporttypes:"MarkdownSummaryGithub" -assemblyfilters:"+SimpleBranchVersioning"

- name: Add Coverage to Job Summary
run: cat ./coverage/report/SummaryGithub.md >> $GITHUB_STEP_SUMMARY
20 changes: 20 additions & 0 deletions coverage.runsettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<CodeCoverage>
<ModulePaths>
<Include>
<ModulePath>.*SimpleBranchVersioning\.dll$</ModulePath>
</Include>
<Exclude>
<ModulePath>.*\.Tests\.dll$</ModulePath>
<ModulePath>.*Basic\.Reference\.Assemblies.*</ModulePath>
</Exclude>
</ModulePaths>
<Attributes>
<Exclude>
<Attribute>^System\.Diagnostics\.CodeAnalysis\.ExcludeFromCodeCoverageAttribute$</Attribute>
<Attribute>^System\.CodeDom\.Compiler\.GeneratedCodeAttribute$</Attribute>
</Exclude>
</Attributes>
</CodeCoverage>
</Configuration>