Skip to content

test: add e2e regression guard for hyphenated build and deploy names - #159

Merged
joshua-temple merged 1 commit into
mainfrom
test/hyphenated-name-e2e
Jun 14, 2026
Merged

joshua-temple merged 1 commit into
mainfrom
test/hyphenated-name-e2e

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

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

  • Single scenario under act: --- PASS: TestMultiStepScenarios/Hyphenated_Build_and_Deploy_Names_Run (27.17s)
  • go build ./... and go test ./... pass (1286 tests); e2e go vet and golangci-lint clean on root and e2e.
  • generate-workflow --force then git diff --exit-code on .github/workflows and .github/actions: no drift.

Closes #136

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>
@joshua-temple
joshua-temple merged commit 476b254 into main Jun 14, 2026
7 checks passed
@joshua-temple joshua-temple added the test Adding or correcting tests label Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Adding or correcting tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

e2e: add a hyphenated build/deploy name scenario (regression guard for #127)

1 participant