Repository navigation
Commit 12a03de
committed
ci: post failure summary as PR comment when Windows test job fails
CI runs on windows-2022 with Python 3.13. Failures are only visible to
people who can authenticate against GitHub Actions logs; remote
contributors and tools that can read PR comments but not Action logs
end up blind.
The new ``Surface failure summary to PR`` step:
- Runs only when the prior test step failed AND the workflow was
triggered by a PR event (push-only workflows are unaffected, and
there's no PR to attach the comment to anyway).
- Tail-trims the captured pytest output to 80 lines so even a
multi-failure run fits inside GitHub's 65 KB per-comment cap.
- Uses ``GITHUB_TOKEN`` (already in scope for any PR workflow) so no
additional secrets are required.
The Test step itself is unchanged in command and meaning; it just
pipes through ``tee pytest.log`` so the on-failure step has the
output to read. ``pipefail`` keeps the original exit code through
the tee.1 parent 56fd488 commit 12a03de
1 file changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
0 commit comments