Skip to content

Commit 1bc9202

Browse files
committed
Configures code coverage settings
Adds a code coverage configuration file to specify which modules should be included or excluded from coverage analysis. Updates the build workflow to use the new configuration file when collecting code coverage data during .NET tests. This allows for more granular control over coverage reporting.
1 parent c7c99be commit 1bc9202

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
run: docker compose up --wait elasticsearch
9393

9494
- name: Run .NET Tests with Coverage
95-
run: dotnet-coverage collect -f cobertura -o coverage/coverage.cobertura.xml dotnet test --no-restore --no-build --configuration Release --results-directory coverage --max-parallel-test-modules 1 --report-github --report-xunit-trx --report-xunit-trx-filename test-results.trx
95+
run: dotnet-coverage collect -s build/codecoverage.config.xml -f cobertura -o coverage/coverage.cobertura.xml dotnet test --no-restore --no-build --configuration Release --results-directory coverage --max-parallel-test-modules 1 --report-github --report-xunit-trx --report-xunit-trx-filename test-results.trx
9696

9797
- name: Code Coverage Summary Report
9898
uses: irongut/CodeCoverageSummary@v1.3.0

build/codecoverage.config.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Configuration>
3+
<CodeCoverage>
4+
<ModulePaths>
5+
<Include>
6+
<ModulePath>.*Exceptionless.*\.dll$</ModulePath>
7+
</Include>
8+
<Exclude>
9+
<ModulePath>.*Exceptionless\.Tests.*\.dll$</ModulePath>
10+
</Exclude>
11+
</ModulePaths>
12+
</CodeCoverage>
13+
</Configuration>

0 commit comments

Comments
 (0)