diff --git a/.github/workflows/ci-code.yml b/.github/workflows/ci-code.yml index 79e26e604..c0717999e 100644 --- a/.github/workflows/ci-code.yml +++ b/.github/workflows/ci-code.yml @@ -40,14 +40,13 @@ jobs: - name: Run Unit Tests run: dotnet test src/Promitor.Tests.Unit/Promitor.Tests.Unit.csproj --logger "trx;LogFileName=test-results.trx" - # Provide Unit Test Results - - name: Report Unit Test Results - uses: dorny/test-reporter@v1 + # Publish Unit Test Results + - name: Upload Test Results + uses: actions/upload-artifact@v2 if: success() || failure() with: - name: .NET Unit Tests + name: test-results path: src/**/test-results.trx - reporter: dotnet-trx code_quality: runs-on: ubuntu-latest # or macos-latest, windows-latest name: Code Quality (R#) @@ -67,4 +66,4 @@ jobs: uses: muno92/resharper_inspectcode@1.6.11 with: solutionPath: src/Promitor.sln - minimumSeverity: warning \ No newline at end of file + minimumSeverity: warning diff --git a/.github/workflows/publish-ci-test-report.yml b/.github/workflows/publish-ci-test-report.yml new file mode 100644 index 000000000..3ed7420b4 --- /dev/null +++ b/.github/workflows/publish-ci-test-report.yml @@ -0,0 +1,24 @@ +name: 'Test Report' +on: + workflow_run: + workflows: ['CI - Code'] + types: + - completed + +permissions: + statuses: write + checks: write + contents: write + pull-requests: write + actions: write + +jobs: + report: + runs-on: ubuntu-latest + steps: + - uses: dorny/test-reporter@v1 + with: + artifact: test-results + name: .NET Unit Tests + path: '*.trx' + reporter: dotnet-trx