From a60e51f44d84b1a13c335e6b75339b8ad8c544bb Mon Sep 17 00:00:00 2001 From: Allen Hutchison Date: Fri, 30 May 2025 15:30:09 -0700 Subject: [PATCH] fix(ci): Adjust reporting for PRs from forks (#627) --- .github/workflows/ci.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 835c6ccf..8937f415 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,15 +90,22 @@ jobs: - name: Run tests and generate reports run: NO_COLOR=true npm run test:ci - - name: Publish Test Report + - name: Publish Test Report (for non-forks) + if: always() && (github.event.pull_request.head.repo.full_name == github.repository) uses: dorny/test-reporter@v1 - if: always() with: name: Test Results (Node ${{ matrix.node-version }}) path: packages/*/junit.xml reporter: java-junit fail-on-error: 'false' + - name: Upload Test Results Artifact (for forks) + if: always() && (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) + uses: actions/upload-artifact@v4 + with: + name: test-results-fork-${{ matrix.node-version }} + path: packages/*/junit.xml + - name: Upload coverage reports uses: actions/upload-artifact@v4 if: always() @@ -110,7 +117,7 @@ jobs: name: Post Coverage Comment runs-on: ubuntu-latest needs: test - if: always() && github.event_name == 'pull_request' + if: always() && github.event_name == 'pull_request' && (github.event.pull_request.head.repo.full_name == github.repository) continue-on-error: true permissions: contents: read # For checkout