diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2324d7a8e..79d3fa7e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -267,6 +267,7 @@ jobs: run: | cd src/ApiService/ dotnet restore --locked-mode + dotnet tool restore - name: Check Formatting run: | cd src/ApiService/ @@ -275,10 +276,12 @@ jobs: run: | cd src/ApiService/ dotnet build -warnaserror --configuration Release - - name: Test + - name: Test & Collect coverage info run: | cd src/ApiService/ - dotnet test --no-restore + dotnet test --no-restore --collect:"XPlat Code Coverage" + dotnet tool run reportgenerator -reports:Tests/TestResults/*/coverage.cobertura.xml -targetdir:coverage -reporttypes:MarkdownSummary + cat coverage/*.md > $GITHUB_STEP_SUMMARY - name: copy artifacts run: | ./src/ci/get-version.sh > src/deployment/VERSION diff --git a/src/ApiService/.config/dotnet-tools.json b/src/ApiService/.config/dotnet-tools.json new file mode 100644 index 000000000..56434e1a1 --- /dev/null +++ b/src/ApiService/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-reportgenerator-globaltool": { + "version": "5.1.9", + "commands": [ + "reportgenerator" + ] + } + } +}