fix(ci): publish PR test results from workflow_run

- stop publishing unit test results directly from the pull_request test jobs\n- upload the GitHub event payload from CI so a follow-up workflow can reuse the original PR context\n- add a workflow_run publisher that downloads backend/frontend test artifacts and posts the check runs and PR comments with the permissions Dependabot PRs require\n- keep the reusable test suite focused on executing tests and producing artifacts without failing on comment permissions
This commit is contained in:
James Cox
2026-03-20 17:20:18 -05:00
parent 62be6b152c
commit 11a76bffe1
3 changed files with 97 additions and 2 deletions
+7 -2
View File
@@ -7,6 +7,11 @@ on:
description: 'The ref to check out before running tests'
required: true
type: string
publish_test_results:
description: 'Whether to publish test results directly from this workflow'
required: false
type: boolean
default: true
jobs:
backend-tests:
@@ -41,7 +46,7 @@ jobs:
- name: Publish Backend Test Results
uses: EnricoMi/publish-unit-test-result-action@c950f6fb443cb5af20a377fd0dfaa78838901040 # v2
if: always()
if: ${{ always() && inputs.publish_test_results }}
with:
files: booklore-api/build/test-results/**/*.xml
check_name: Backend Test Results
@@ -106,7 +111,7 @@ jobs:
- name: Publish Frontend Test Results
uses: EnricoMi/publish-unit-test-result-action@c950f6fb443cb5af20a377fd0dfaa78838901040 # v2
if: always()
if: ${{ always() && inputs.publish_test_results }}
with:
files: booklore-ui/test-results/vitest-results.xml
check_name: Frontend Test Results