test: add e2e regression guard for hyphenated build and deploy names - #159
Merged
Merged
Conversation
Adds a runtime orchestrate scenario whose build (shared-lib) and deploy (web-api) names contain hyphens, asserting each job runs under act when its trigger fires and skips otherwise. Guards against a regression where the change-detection if: reference and the setup output key disagree on hyphen normalization, which silently skips the job. Closes #136 Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
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.
Problem
#127 was a generator bug where a build or deploy whose name contained a hyphen (e.g. shared-lib) had its change-detection if: condition reference the underscore-normalized output key (run_build_shared_lib) while the setup job wrote and passed through the raw hyphenated key (run_build_shared-lib). GitHub Actions parses the hyphen inside an expression as subtraction, so the reference never resolved, the condition was always false, and the job was silently skipped. #135 fixed the generator and added a unit golden plus actionlint guard. #136 asked for a runtime act guard so a regression is caught end to end, not only in unit output.
Fix
Adds e2e/scenarios/orchestrate/hyphenated-names.yaml: a runtime orchestrate scenario with a hyphenated build (shared-lib, trigger lib/) and a hyphenated deploy (web-api, trigger api/). Step 1 touches only the build trigger and asserts build-shared-lib runs (success) while deploy-web-api skips; step 2 touches only the deploy trigger and asserts deploy-web-api runs while build-shared-lib skips. Each run pins one hyphenated job to success and the other to skipped, so the if: condition is proven to track its own change-detection key. If the hyphen normalization regressed, the expected-success job would report skipped and the assertion would fail.
Verification
--- PASS: TestMultiStepScenarios/Hyphenated_Build_and_Deploy_Names_Run (27.17s)Closes #136