fix(ci): Adjust reporting for PRs from forks (#627)
This commit is contained in:
parent
01768d7759
commit
a60e51f44d
|
@ -90,15 +90,22 @@ jobs:
|
||||||
- name: Run tests and generate reports
|
- name: Run tests and generate reports
|
||||||
run: NO_COLOR=true npm run test:ci
|
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
|
uses: dorny/test-reporter@v1
|
||||||
if: always()
|
|
||||||
with:
|
with:
|
||||||
name: Test Results (Node ${{ matrix.node-version }})
|
name: Test Results (Node ${{ matrix.node-version }})
|
||||||
path: packages/*/junit.xml
|
path: packages/*/junit.xml
|
||||||
reporter: java-junit
|
reporter: java-junit
|
||||||
fail-on-error: 'false'
|
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
|
- name: Upload coverage reports
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
if: always()
|
if: always()
|
||||||
|
@ -110,7 +117,7 @@ jobs:
|
||||||
name: Post Coverage Comment
|
name: Post Coverage Comment
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test
|
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
|
continue-on-error: true
|
||||||
permissions:
|
permissions:
|
||||||
contents: read # For checkout
|
contents: read # For checkout
|
||||||
|
|
Loading…
Reference in New Issue