Skip to content

Commit fc409d8

Browse files
author
mattana
committed
fix: Update .dockerignore and .gitignore to exclude test and coverage artifacts; modify coverage.yml for improved coverage report generation
1 parent 7252dd7 commit fc409d8

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
**/node_modules
2020
**/npm-debug.log
2121
**/obj
22+
**/TestResults
23+
**/coverage*
24+
**/coverage-report
2225
**/secrets.dev.yaml
2326
**/values.dev.yaml
2427
LICENSE

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ jobs:
2121
run: dotnet restore
2222

2323
- name: Test with coverage
24-
run: dotnet test --collect:"XPlat Code Coverage" /p:Threshold=85 /p:ThresholdType=line
24+
run: dotnet test --results-directory TestResults /p:CollectCoverage=true /p:CoverletOutput=TestResults/coverage/coverage /p:CoverletOutputFormat=cobertura /p:Threshold=85 /p:ThresholdType=line
2525

2626
- name: Install reportgenerator
2727
run: dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.1.0
2828

2929
- name: Generate coverage report
30-
run: ~/.dotnet/tools/reportgenerator -reports:**/TestResults/*/coverage.cobertura.xml -targetdir:coverage-report -reporttypes:Html
30+
run: ~/.dotnet/tools/reportgenerator -reports:TestResults/coverage/coverage.cobertura.xml -targetdir:coverage-report -reporttypes:Html
3131

3232
- name: Upload coverage report
3333
uses: actions/upload-artifact@v4

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,3 +346,10 @@ healthchecksdb
346346
.env.*
347347
.DS_Store
348348
Thumbs.db
349+
350+
# Test and coverage artifacts
351+
TestResults/
352+
tests/**/TestResults/
353+
coverage/
354+
coverage-report/
355+
*.cobertura.xml

0 commit comments

Comments
 (0)