diff --git a/.github/workflows/publish_nuget.yml b/.github/workflows/publish_nuget.yml index be70fbd..aeee73a 100644 --- a/.github/workflows/publish_nuget.yml +++ b/.github/workflows/publish_nuget.yml @@ -43,14 +43,12 @@ jobs: - name: Test run: dotnet test --logger "trx;LogFileName=test-results.trx" --no-restore - - name: Test Report - uses: dorny/test-reporter@v1 - if: always() + # see https://github.com/dorny/test-reporter?tab=readme-ov-file#recommended-setup-for-public-repositories + - uses: actions/upload-artifact@v7 # upload test results + if: success() || failure() # run this step even if previous step failed with: - name: DotNET Tests - path: "**/test-results.trx" - reporter: dotnet-trx - fail-on-error: true + name: test-results + path: "**/*.trx" deploy: name: 'Nuget Push' diff --git a/.github/workflows/tests-report.yml b/.github/workflows/tests-report.yml new file mode 100644 index 0000000..17652b0 --- /dev/null +++ b/.github/workflows/tests-report.yml @@ -0,0 +1,21 @@ +name: 'Test Report' +on: + workflow_run: + workflows: ['CI'] # runs after CI workflow + types: + - completed +permissions: + contents: read + actions: read + checks: write +jobs: + report: + runs-on: ubuntu-latest + steps: + - uses: dorny/test-reporter@v3 + with: + artifact: test-results # artifact name + name: DotNET Tests + path: "**/*.trx" + reporter: dotnet-trx + use-actions-summary: 'false' # create a Check Run on the PR instead of only writing to Actions Summary