11name : Post Test Status
22
33# This workflow runs in the base repo context (with write permissions)
4- # even for fork PRs, allowing us to post commit statuses.
4+ # even for fork PRs, allowing us to post commit statuses and check runs .
55#
6- # Add any status posting for skipped jobs here to avoid "Resource not
7- # accessible by integration" errors when PRs come from forks .
6+ # Add any status posting or check run creation for fork PRs here to avoid
7+ # "Resource not accessible by integration" errors.
88
99on :
1010 workflow_run :
@@ -30,19 +30,13 @@ jobs:
3030 const headSha = context.payload.workflow_run.head_sha;
3131
3232 // Define jobs that need a success status posted when skipped
33- // Format: { jobName: 'GitHub Job Name', statusContext: 'status/context-name', description: 'Description' }
3433 const skippedStatusJobs = [
3534 {
3635 jobName: 'Dash Table Visual Tests',
3736 statusContext: 'percy/dash-table-test',
3837 description: 'Skipped — no dash-table changes'
3938 }
40- // Add more jobs here as needed:
41- // {
42- // jobName: 'Job Name',
43- // statusContext: 'context/name',
44- // description: 'Skipped — reason'
45- // }
39+ // Add more jobs here as needed
4640 ];
4741
4842 // Get all jobs for the workflow run
7064 console.log(`Job "${jobName}" status: ${job?.conclusion ?? 'not found'} - no status posted`);
7165 }
7266 }
67+
68+ test-report :
69+ name : Consolidated Test Report (Fork PR)
70+ runs-on : ubuntu-latest
71+ # Only run for fork PRs (non-fork PRs are handled in the main workflow)
72+ if : |
73+ github.event.workflow_run.event == 'pull_request' &&
74+ github.event.workflow_run.head_repository.full_name != github.repository
75+ permissions :
76+ checks : write
77+ actions : read
78+ steps :
79+ - name : Download test results artifact
80+ uses : actions/download-artifact@v4
81+ with :
82+ pattern : ' *-results-*'
83+ path : test-results
84+ merge-multiple : false
85+ github-token : ${{ secrets.GITHUB_TOKEN }}
86+ run-id : ${{ github.event.workflow_run.id }}
87+
88+ - name : List downloaded results
89+ run : find test-results -name "*.xml" -type f 2>/dev/null || echo "No XML files found"
90+
91+ - name : Publish Test Report
92+ uses : dorny/test-reporter@v1
93+ if : always()
94+ with :
95+ name : Test Results Summary
96+ path : ' test-results/**/*.xml'
97+ reporter : java-junit
98+ fail-on-error : false
99+ fail-on-empty : false
100+ list-suites : ' failed'
101+ list-tests : ' failed'
102+ max-annotations : ' 50'
0 commit comments