Skip to content

Commit 5d78c66

Browse files
ANcpLuaclaude
andcommitted
Fix CI: Remove --no-build flag to allow Coverlet MSBuild properties
The --no-build flag prevents MSBuild properties like /p:CollectCoverage from working. Removing it allows Coverlet to instrument and collect coverage data properly during the test run. Also removed .NET 10 target as it's not yet available in CI runners. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent d050929 commit 5d78c66

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

.github/workflows/tests.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,21 @@ jobs:
3333
- name: Run tests for .NET 8 with coverage
3434
run: |
3535
dotnet test SWEN3.Paperless.RabbitMq.Tests/SWEN3.Paperless.RabbitMq.Tests.csproj \
36-
-f net8.0 --no-build --configuration Release \
37-
/p:CollectCoverage=true /p:CoverletOutputFormat=cobertura \
36+
-f net8.0 \
37+
/p:Configuration=Release \
38+
/p:CollectCoverage=true \
39+
/p:CoverletOutputFormat=cobertura \
3840
/p:CoverletOutput=TestResults/coverage-net8.cobertura.xml
3941
4042
- name: Run tests for .NET 9 with coverage
4143
run: |
4244
dotnet test SWEN3.Paperless.RabbitMq.Tests/SWEN3.Paperless.RabbitMq.Tests.csproj \
43-
-f net9.0 --no-build --configuration Release \
44-
/p:CollectCoverage=true /p:CoverletOutputFormat=cobertura \
45+
-f net9.0 \
46+
/p:Configuration=Release \
47+
/p:CollectCoverage=true \
48+
/p:CoverletOutputFormat=cobertura \
4549
/p:CoverletOutput=TestResults/coverage-net9.cobertura.xml
4650
47-
- name: Run tests for .NET 10 with coverage
48-
run: |
49-
dotnet test SWEN3.Paperless.RabbitMq.Tests/SWEN3.Paperless.RabbitMq.Tests.csproj \
50-
-f net10.0 --no-build --configuration Release \
51-
/p:CollectCoverage=true /p:CoverletOutputFormat=cobertura \
52-
/p:CoverletOutput=TestResults/coverage-net10.cobertura.xml
53-
5451
- name: Verify coverage files exist
5552
run: |
5653
echo "Listing coverage files:"
@@ -62,7 +59,7 @@ jobs:
6259
- name: Merge coverage reports
6360
run: |
6461
reportgenerator \
65-
-reports:"SWEN3.Paperless.RabbitMq.Tests/TestResults/coverage-net8.cobertura.xml;SWEN3.Paperless.RabbitMq.Tests/TestResults/coverage-net9.cobertura.xml;SWEN3.Paperless.RabbitMq.Tests/TestResults/coverage-net10.cobertura.xml" \
62+
-reports:"SWEN3.Paperless.RabbitMq.Tests/TestResults/coverage-net8.cobertura.xml;SWEN3.Paperless.RabbitMq.Tests/TestResults/coverage-net9.cobertura.xml" \
6663
-targetdir:"./coverage-merged" \
6764
-reporttypes:"Cobertura"
6865

0 commit comments

Comments
 (0)