Skip to content

Commit 0549423

Browse files
Post sticky PR comment summarizing CI test job failures (#1412)
Add a `pr-test-summary` job that runs after all test jobs complete and posts a sticky comment on the PR listing which matrix jobs failed with direct links to their logs. The comment updates in-place on re-run. <img width="990" height="1079" alt="image" src="https://github.com/user-attachments/assets/4648a3c5-78a3-403e-96db-44eed0e688ee" /> Authors: - Ramakrishna Prabhu (https://github.com/ramakrishnap-nv) Approvers: - Miles Lubin (https://github.com/mlubin) - James Lamb (https://github.com/jameslamb) URL: #1412
1 parent 6a2ae8b commit 0549423

2 files changed

Lines changed: 23 additions & 6 deletions

File tree

.github/workflows/pr.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
- wheel-tests-cuopt-server
3535
- wheel-build-cuopt-sh-client
3636
- test-self-hosted-server
37+
- pr-test-summary
3738
permissions:
3839
contents: read
3940
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@main
@@ -623,3 +624,25 @@ jobs:
623624
with:
624625
build_type: pull-request
625626
script: ci/test_self_hosted_service.sh
627+
pr-test-summary:
628+
needs:
629+
- conda-cpp-tests
630+
- conda-python-tests
631+
- wheel-tests-cuopt
632+
- wheel-tests-cuopt-server
633+
- test-self-hosted-server
634+
if: always()
635+
continue-on-error: true
636+
runs-on: ubuntu-latest
637+
permissions:
638+
actions: read
639+
pull-requests: write
640+
steps:
641+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
642+
with:
643+
persist-credentials: false
644+
sparse-checkout: ci/utils/pr_test_summary.py
645+
sparse-checkout-cone-mode: false
646+
- run: python3 ci/utils/pr_test_summary.py
647+
env:
648+
GH_TOKEN: ${{ github.token }}

ci/utils/pr_test_summary.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,6 @@ def _build_body(failed, passed, skipped, job_analysis):
139139
lines.append(
140140
f"**{len(failed)} failed** · {len(passed)} passed · {len(skipped)} skipped"
141141
)
142-
lines += ["", "| Job | Logs |", "|-----|------|"]
143-
for job in failed:
144-
lines.append(
145-
f"| ❌ `{job['name']}` | [View logs]({job['html_url']}) |"
146-
)
147-
148142
for job in failed:
149143
tests = job_analysis[job["id"]]
150144
if not tests:

0 commit comments

Comments
 (0)