diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 25e01ae..57486fe 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -11,7 +11,9 @@ on: # yamllint disable-line rule:truthy branches: - master -permissions: read-all +permissions: + contents: read + pull-requests: write env: DOTNET_NOLOGO: true @@ -51,7 +53,17 @@ jobs: run: dotnet build --no-restore - name: Run tests - run: dotnet test --no-build --verbosity normal + run: dotnet test --no-build --verbosity normal --logger trx --collect:"XPlat Code Coverage" + + - name: Generate Test report + uses: bibipkins/dotnet-test-reporter@v1.4.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + comment-title: 'Test Results' + results-path: tests/**/*.trx + coverage-path: tests/**/coverage.cobertura.xml + coverage-type: cobertura + coverage-threshold: 60 - name: Push to MyGet env: