diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4d2f68e..19edc0b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,14 +88,16 @@ jobs: run: dotnet build - name: Test - run: dotnet test --logger "console;verbosity=detailed" --blame-crash -v n --blame-hang-timeout 10m + run: | + dotnet test --logger "console;verbosity=detailed" --logger "trx;LogFilePrefix=test-results" --results-directory tests/Temporalio.Tests/TestResults --blame-crash -v n --blame-hang-timeout 10m - - name: Upload test failure - if: ${{ failure() }} + - name: Upload test results + if: ${{ !cancelled() }} uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 with: - name: test-fail-${{ matrix.os }} - path: tests/Temporalio.Tests/TestResults + name: test-results-${{ matrix.os }} + path: tests/Temporalio.Tests/TestResults/**/*.trx + if-no-files-found: warn - name: Confirm bench works run: dotnet run --project tests/Temporalio.SimpleBench/Temporalio.SimpleBench.csproj -- --workflow-count 5 --max-cached-workflows 100 --max-concurrent 100 diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml new file mode 100644 index 00000000..ecbb1895 --- /dev/null +++ b/.github/workflows/test-report.yml @@ -0,0 +1,25 @@ +name: Test Report +on: + workflow_run: + workflows: + - Continuous Integration + types: + - completed +permissions: + contents: read + actions: read + checks: write + +jobs: + report: + if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion != 'cancelled' }} + runs-on: ubuntu-latest + steps: + - name: Test Report + uses: dorny/test-reporter@a43b3a5f7366b97d083190328d2c652e1a8b6aa2 # v3 + with: + artifact: /test-results-(.*)/ + name: Test Results ($1) + path: '**/*.trx' + reporter: dotnet-trx + use-actions-summary: 'false'