diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee4eff4..9f73a4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: run: dotnet build -c Release --no-restore - name: Run tests - run: dotnet test -c Release --no-build --logger "trx;LogFileName=test-results.trx" --results-directory TestResults + run: dotnet test -c Release --no-build --logger "trx;LogFileName=test-results.trx" --results-directory TestResults --collect "XPlat Code Coverage" --settings tests/coverlet.runsettings - name: Upload test results if: always() @@ -42,3 +42,11 @@ jobs: name: test-results path: TestResults/**/*.trx if-no-files-found: warn + + - name: Upload coverage report + if: always() + uses: actions/upload-artifact@v4 + with: + name: coverage-report + path: TestResults/**/coverage.cobertura.xml + if-no-files-found: warn diff --git a/tests/coverlet.runsettings b/tests/coverlet.runsettings new file mode 100644 index 0000000..4b61f07 --- /dev/null +++ b/tests/coverlet.runsettings @@ -0,0 +1,17 @@ + + + + + + + cobertura + [FixedPointNano]* + [FixedPointNano.Tests]* + GeneratedCodeAttribute,CompilerGeneratedAttribute + false + true + + + + +