✨ Add workflow summary step showing gate decision#316
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a workflow-run summary to make the ci-e2e-openshift “gate” decision (run vs skip E2E) visible at a glance, addressing the difficulty in distinguishing “green but skipped” runs from real test executions.
Changes:
- Adds a “Write workflow summary” step to the
gatejob that writes a short Markdown summary based onsteps.check.outputs.should_run.
| core.summary.addRaw('**E2E tests will run** for this trigger.').write(); | ||
| } else { | ||
| core.summary.addRaw('**E2E tests were skipped** (gate check did not pass for this trigger).').write(); | ||
| } |
There was a problem hiding this comment.
core.summary.write() is async; without awaiting it, the workflow can finish the step before the summary is persisted, leading to missing/partial summaries. Use await on the .write() call in both branches (or build the summary and await core.summary.write() once).
| core.summary.addRaw('**E2E tests will run** for this trigger.').write(); | |
| } else { | |
| core.summary.addRaw('**E2E tests were skipped** (gate check did not pass for this trigger).').write(); | |
| } | |
| core.summary.addRaw('**E2E tests will run** for this trigger.'); | |
| } else { | |
| core.summary.addRaw('**E2E tests were skipped** (gate check did not pass for this trigger).'); | |
| } | |
| await core.summary.write(); |
There was a problem hiding this comment.
Good point. Fixed.
|
|
||
| - name: Write workflow summary | ||
| if: always() | ||
| uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 |
There was a problem hiding this comment.
This workflow already uses actions/github-script v8.0.0 for the gate check step; adding a v7.0.1 invocation here introduces an unnecessary version skew (and potentially different bundled @actions/* APIs). Consider switching this step to the same pinned v8 SHA used elsewhere in the workflow for consistency and to reduce maintenance risk.
| uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 |
This is part of Andy's work from PR 285. Co-Authored-By: Andrew Anderson <andy@clubanderson.com> Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
92d2bf4 to
d1b9e27
Compare

This is part of Andy's work from PR 285. This particular piece makes the "gate" job in the E2E-on-OpenShift workflow post the job's decision in the job's "summary".
I think that this is intended to address #272, but IMO it does not actually do so.