fix(ci): Adjust reporting for PRs from forks (#627)

This commit is contained in:
Allen Hutchison 2025-05-30 15:30:09 -07:00 committed by GitHub
parent 01768d7759
commit a60e51f44d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 3 deletions

View File

@ -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