From 9dac1d747f78cdbea9309e1b86ffcb5d39d7bcc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Denuzi=C3=A8re?= Date: Mon, 20 Nov 2023 14:20:44 +0100 Subject: [PATCH] fix: github action test report on pull requests (#338) --- .github/workflows/build.yml | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bc176287..c8931a42 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,23 +57,13 @@ jobs: name: TestResults path: tests/Unit/TestResults/*.trx - report: - needs: build - if: github.event.pull_request.head.repo.full_name == github.repository - runs-on: ubuntu-latest - - steps: - - name: Download test results - uses: actions/download-artifact@v2 - with: - name: TestResults - - - name: Report tests - uses: dorny/test-reporter@v1 - with: - name: Unit tests - path: TestResults/*.trx - reporter: dotnet-trx + - name: Report tests + if: ${{ ! (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }} + uses: dorny/test-reporter@v1 + with: + name: Unit tests + path: tests/Unit/TestResults/*.trx + reporter: dotnet-trx prerelease: runs-on: ubuntu-latest