Skip to content

Commit 999a1ad

Browse files
feat: add coverage to nuget
1 parent 77fcb0e commit 999a1ad

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/nuget.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: dotnet build --configuration Release /p:Version=${{ steps.get_version.outputs.VERSION }}
4141

4242
- name: Run Unit Tests
43-
run: dotnet test --configuration Release --no-build --verbosity normal --logger "junit;LogFilePath=../results/test-results.xml"
43+
run: dotnet test --configuration Release --no-build --verbosity normal --logger "junit;LogFilePath=../results/test-results.xml" --collect:"XPlat Code Coverage"
4444

4545
- name: Test Report
4646
uses: dorny/test-reporter@v1
@@ -50,6 +50,13 @@ jobs:
5050
path: "**/test-results.xml"
5151
reporter: java-junit
5252

53+
- name: Upload Coverage to Codecov
54+
uses: codecov/codecov-action@v4
55+
with:
56+
files: "**/coverage.cobertura.xml"
57+
token: ${{ secrets.CODECOV_TOKEN }}
58+
fail_ci_if_error: true
59+
5360
- name: Build NuGet Package
5461
run: dotnet pack WouterVanRanst.Utils/WouterVanRanst.Utils.csproj --configuration Release /p:Version=${{ steps.get_version.outputs.VERSION }}
5562

0 commit comments

Comments
 (0)