Repository navigation
ci: post test results as a PR comment - #17
Merged
Merged
Conversation
Runs bun test with the JUnit reporter and publishes a single, updating PR comment (via publish-unit-test-result-action) summarizing pass/fail counts and failing tests, so reviewers see results without opening the Actions log.
check_run defaulted to true, which needs a checks:write permission we don't grant (job only has contents:read/pull-requests:write), causing a 403 on POST /check-runs. We only need the PR comment, not a separate check run, so disable it instead of widening permissions.
Replace EnricoMi/publish-unit-test-result-action with junit-to-ctrf + ctrf-io/github-test-reporter so the PR comment renders as a CTRF-style summary table (tests/passed/failed/skipped/pending/other/flaky/duration) with an "updated" footer. update-comment + comment-tag keep it a single, upserted comment across re-runs, matching the requested comment design and the existing update-in-place requirement.
update-comment appends each run's report to the same comment, which stacked duplicate result tables across re-runs instead of keeping the comment as a single up-to-date report. overwrite-comment replaces the tagged comment's content in place, which is the actual "stays up to date" behavior that was intended.
test: Run #32
🎉 All tests passed!Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
- Drop Pending/Other/Flaky columns via a custom Handlebars template (.github/ctrf-pr-report.hbs), since github-test-reporter's built-in pull-request-report table hardcodes all 8 columns with no way to configure them out. - junit-to-ctrf always zeroes summary.start/stop, which is why Duration showed "not captured". Capture real timestamps around the bun test step and patch them into the CTRF report with jq before publishing.
Sync main specs/ with the delta specs (new pr-test-report-comment capability, updated ci-test-workflow requirement) and archive the completed change now that the workflow ships in .github/workflows/test.yml.
Sync main specs/ with the delta specs (new cache-upstash-adapter capability, updated package-exports requirements) and archive the completed change now that the Upstash adapter has shipped.
joeykamsteeg
marked this pull request as ready for review
August 3, 2026 21:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bun testnow runs with--reporter=junit --reporter-outfile=test-report.xmlso it produces a structured report.EnricoMi/publish-unit-test-result-action, pinned to thev2.24.0commit SHA) showing pass/fail/skip counts and any failing test names.pull_requestevents (push-to-develop/mainandworkflow_dispatchruns are unaffected) and usesif: always()so it still comments when tests fail.pull-requests: writepermission scoped to thetestjob only.openspec/changes/add-test-report-pr-comment/.Test plan
bun test --reporter=junit --reporter-outfile=...produces valid JUnit XML.main/developand a manualworkflow_dispatchrun do not attempt to comment.🤖 Generated with Claude Code