ci: add regression test for step output interpolation (#68) - #73
Merged
Conversation
Reproduce the exact scenario from issue #68: write a value to $GITHUB_OUTPUT in a step with an id, assert the runner interpolates it, then send it through the message input with format: markdown. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a CI regression test for issue #68 by creating a step output via $GITHUB_OUTPUT, asserting the GitHub Actions runner interpolates steps.<id>.outputs.<name> correctly, and then sending that interpolated value through this action using format: markdown.
Changes:
- Add a step that writes
discussionCount=42to$GITHUB_OUTPUT(with anidfor downstream reference). - Add a shell assertion step that fails if
${{ steps.repo-discussion.outputs.discussionCount }}is not interpolated to42. - Add a
uses: ./action invocation that sends a Telegram message containing the interpolated step output (mirrors the issue #68 scenario).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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
Add a CI regression test that reproduces the exact scenario reported in issue #68: a step writes a value to
$GITHUB_OUTPUT, a follow-up step asserts the runner interpolates${{ steps.<id>.outputs.<name> }}correctly, and the value is then sent through themessageinput withformat: markdown.This proves the reported scenario works end to end. Expression interpolation happens in the GitHub Actions runner before the action container starts, so the action only ever receives the final string — the "not work" symptom in #68 is caused by workflow configuration on the caller side (most commonly a missing
id:on the step that writes the output, or an output produced in a different job without ajobs.<id>.outputsmapping), not by telegram-action.Verified green on run 31923863537:
verify step output is interpolatedexecutedtest "42" = "42"— the expression was expanded by the runner.message: There are currently 42 discussions, come on!and the Telegram message was delivered successfully.Related issues
Architecture / flow
flowchart TD A["set step output<br/>(id: repo-discussion)<br/>echo discussionCount=42 >> $GITHUB_OUTPUT"] --> B["verify step output is interpolated<br/>test '42' = '42'"] B --> C["send message with step output<br/>uses: ./ with message containing<br/>steps.repo-discussion.outputs.discussionCount"] style A fill:#d4edda,stroke:#28a745 style B fill:#d4edda,stroke:#28a745 style C fill:#d4edda,stroke:#28a745AI authorship
.github/workflows/ci.yml(new test steps)Change classification
CI-only test addition; no action code, inputs, or published image are touched.
Plan reference
Prove issue #68's scenario (
$GITHUB_OUTPUTstep output used in themessageinput) works, as a permanent regression test in CI.Verification
telegram messageworkflow ran green on this branch — run 31923863537. The new steps interpolated the output and delivered the Telegram message.test "42" = "42"andmessage: There are currently 42 discussions, come on!.Security check
Risk and rollback
buildjob; worst case is a CI failure on this workflow.git revert 6544097).Reviewer guide
.github/workflows/ci.yml(set step output,verify step output is interpolated,send message with step output).🤖 Generated with Claude Code