ci: collapse mock e2e PR comment tables (#1465)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Engel Nyst
2026-06-23 15:56:16 +02:00
committed by GitHub
co-authored by openhands
parent c95176f517
commit 01d141d0cd
7 changed files with 505 additions and 108 deletions
+5 -2
View File
@@ -403,8 +403,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh pr comment "${{ steps.ctx.outputs.pr_number }}" \
--body-file "$MOCK_LLM_REPORT_PATH"
node tests/e2e/mock-llm/scripts/upsert-pr-comment.mjs \
--issue-number "${{ steps.ctx.outputs.pr_number }}" \
--body-file "$MOCK_LLM_REPORT_PATH" \
--marker "<!-- agent-canvas-mock-llm-docker-e2e-report -->" \
--legacy-title "Mock-LLM Docker E2E Test Results"
- name: Fail job when tests fail
if: always()
+12 -5
View File
@@ -6,8 +6,8 @@
#
# Same-repo PRs already get an inline comment from the test workflow
# itself; this workflow covers the fork-PR gap. It is safe because it
# never checks out or executes PR code — it only downloads the rendered
# report artifact and posts it.
# only checks out base-repository workflow code, never PR code, then downloads
# the rendered report artifact and posts it.
name: "Mock-LLM E2E: Post PR Comment"
@@ -17,6 +17,7 @@ on:
types: [completed]
permissions:
contents: read
pull-requests: write
jobs:
@@ -28,6 +29,9 @@ jobs:
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.head_repository.full_name != github.repository
steps:
- name: Check out base repository
uses: actions/checkout@v6
- name: Download PR comment payload
uses: actions/download-artifact@v4
id: download
@@ -41,12 +45,15 @@ jobs:
if: steps.download.outcome == 'success'
continue-on-error: true
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ github.token }}
run: |
PR_NUMBER=$(cat pr_number.txt)
if [ -z "$PR_NUMBER" ]; then
echo "::warning::Could not determine PR number; skipping comment."
exit 0
fi
gh pr comment "$PR_NUMBER" --body-file mock-llm-report.md
node tests/e2e/mock-llm/scripts/upsert-pr-comment.mjs \
--issue-number "$PR_NUMBER" \
--body-file mock-llm-report.md \
--marker "<!-- agent-canvas-mock-llm-e2e-report -->" \
--legacy-title "Mock-LLM E2E Tests"
+5 -2
View File
@@ -322,8 +322,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh pr comment "${{ github.event.pull_request.number }}" \
--body-file "$MOCK_LLM_REPORT_PATH"
node tests/e2e/mock-llm/scripts/upsert-pr-comment.mjs \
--issue-number "${{ github.event.pull_request.number }}" \
--body-file "$MOCK_LLM_REPORT_PATH" \
--marker "<!-- agent-canvas-mock-llm-e2e-report -->" \
--legacy-title "Mock-LLM E2E Tests"
- name: Fail job when tests fail
if: always()