actions: fix entrypoint drift; test free /review URL via a review_url output#123
Open
reuvenharrison wants to merge 4 commits into
Open
actions: fix entrypoint drift; test free /review URL via a review_url output#123reuvenharrison wants to merge 4 commits into
reuvenharrison wants to merge 4 commits into
Conversation
Add a `review_url` output to the breaking action (the free /review link it already emits as a notice) so tests can assert on it directly. Rewrite the two free-review URL tests to run the real action via `uses:` and check the output, instead of invoking the entrypoint on the runner under dash. They now run on the production platform (Alpine/busybox ash) with no shell-compat workarounds, and the strip test exercises real git-ref resolution (HEAD:specs/base.yaml), which had no CI coverage. Also align entrypoint drift: write_output now matches changelog/diff, add set -o pipefail (consistent with changelog/diff; safe now that every breaking test runs in-container), and drop an em-dash from a comment.
The review_url echo was between `breaking<<$delimiter` and its closing delimiter, so it got folded into the `breaking` output value (breaking the existing output-comparison tests) and never became its own output (so the URL tests saw it empty). Move it after the block closes.
Mirror the breaking change: add a review_url output (written after the multiline changelog block closes) and rewrite the two free-review URL tests to run the real action via uses: + assert on the output, dropping the bash/dash workaround. Also expands the base_sha comment to match breaking's (drift cleanup).
The entrypoints are #!/bin/sh. pipefail is not POSIX (the runner's dash rejects it), and it bought nothing here: every pipeline is either inside an if-condition or ends in the command whose failure already propagates. Standardize all four on `set -e` only, which also makes them runnable directly under the runner's dash.
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.
Fixes the drift across the four action entrypoints and makes the free-review URL tests run on the production platform via a real action output instead of stubbing the entrypoint under the runner's shell.
Entrypoint drift
write_output:breakingwas a prefixed-global variant; aligned to thelocalversion used bychangelog/diff.base_shacomment:changelogreferenced "see breaking/entrypoint.sh"; both now carry the full rationale (and an em-dash is gone).set -o pipefail: removed fromchangelog/diff(and not added elsewhere). The entrypoints are#!/bin/sh;pipefailis non-POSIX and bought nothing here (every pipeline is in anifcondition or ends in the command whose failure already propagates). All four are nowset -eonly.review_url output + faithful URL tests
review_urloutput on thebreakingandchangelogactions (the free/reviewlink they already emit as a::notice::), written after the multiline output block so it isn't folded into it.uses:and assert onsteps.*.outputs.review_url— on the production platform (Alpine/busyboxash), with no stub /docker run/bashworkaround.base: HEAD:specs/base.yaml, exercising real git-ref resolution (the recommended base form), which previously had no CI coverage.Why an output instead of reading the annotation
::notice::annotations and step logs can't be read by a later step; only declared outputs cross the step boundary. The output is also genuinely useful to real workflows.pr-comment
Intentionally unchanged. Its tests invoke the entrypoint directly (it needs PR context, and 4 of them assert on exit codes / ARG_MAX payload behavior). Running them under the runner's
dashis the correct strict-POSIX gate, and the ARG_MAX limit is kernel-level (identical in-container), so prod-platform fidelity adds ~nothing for them.Test plan
uses:tests unaffected by the entrypoint changes