Skip to content

Report test results in the CI run summary too - #47

Merged
jstayton merged 1 commit into
developmentfrom
report-test-results
Aug 27, 2026
Merged

jstayton merged 1 commit into
developmentfrom
report-test-results

Conversation

@jstayton

Copy link
Copy Markdown
Contributor

Follow-up to #46, aligning it with the equivalent job in queryql:
TRUEPIC/queryql#96

Two changes.

The job already ran the whole suite but reported only coverage, so the test
results stayed in the job log. Node prints its own summary block immediately
before the coverage report, so surfacing it costs one more grep over output
we were already capturing.

More importantly, reporting now happens in its own step. The default shell is
bash -e, so the set -o pipefail added in #46 made a failing suite abort the
step before the summary block ran — meaning a red run got no summary at all,
losing both the results and the coverage report at the one moment they were
most worth reading. I checked with a deliberately failing test: bash -e with
a failing pipe exits 1 and never reaches the following block. Node emits both
its summary and the coverage report even when tests fail, so splitting the
report into its own step with if: ${{ !cancelled() }} is enough to keep them.

$RUNNER_TEMP/coverage.txt is renamed to tests.txt, since it now holds both.
AGENTS.md gets the same one-line correction.

Rendered summary:

## Tests

tests 37
suites 4
pass 37
fail 0
cancelled 0
skipped 0
todo 0
duration_ms 424.943458

## Test coverage

----------------------------------------------------------
file      | line % | branch % | funcs % | uncovered lines
----------------------------------------------------------
src       |        |          |         |
 error.js | 100.00 |   100.00 |  100.00 |
 main.js  | 100.00 |   100.00 |  100.00 |
----------------------------------------------------------
all files | 100.00 |   100.00 |  100.00 |
----------------------------------------------------------

🤖 Generated with Claude Code

The coverage job ran the tests and reported only coverage, so the test
results stayed in the job log. Node prints its own summary block right
before the coverage report, so surfacing it costs one more `grep`.

Reporting now happens in its own step. The default shell is `bash -e`, so
`set -o pipefail` made a failing suite abort the step before it wrote the
summary — the run lost both the results and the coverage report at the
one moment they were most worth reading. Node emits both even when tests
fail, so `if: ${{ !cancelled() }}` is enough to keep them.

This matches the shape of the job in queryql:
TRUEPIC/queryql#96

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jstayton
jstayton merged commit eb0547b into development Aug 27, 2026
5 checks passed
@jstayton
jstayton deleted the report-test-results branch August 27, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant