ci(molecule): skip the Molecule runner when no scenario is selected #503

Open
Claude wants to merge 3 commits from ci/433-skip-empty-molecule into main
pull from: ci/433-skip-empty-molecule
3 Commits
Author SHA1 Message Date
Defame1297 e4039871a6 Merge branch 'main' into ci/433-skip-empty-molecule
Build / build (pull_request) Successful in 26s
Molecule / select (pull_request) Successful in 8s
Lint / lint (pull_request) Successful in 4m27s
Molecule / scenarios (pull_request) Successful in 39m25s
Molecule / Result (pull_request) Successful in 3s
2026-12-02 00:00:32 +00:00
Defame1297 479efe1ddc ci(molecule): fail the Molecule result when select's output is lost
Build / build (pull_request) Successful in 25s
Lint / lint (pull_request) Successful in 2m26s
Molecule / select (pull_request) Successful in 21s
Molecule / Result (pull_request) Canceled after 0s
Molecule / scenarios (pull_request) Canceled after 10m23s
An empty select output meant "nothing selected", so an output lost on
the way from select to result also passed the required check. select now
writes `none` for an empty selection; scenarios runs for neither `none`
nor an empty output, and result passes a skipped scenarios only for
`none`.

The result-logic test runs under sh, as act runs a job container's step
without a shell, and a new test parses what select writes to
GITHUB_OUTPUT. The fork-guard test compares each job with the literal
guard.

Assisted-by: Claude Code
2026-12-01 23:42:59 +00:00
Defame1297 2d1f142662 ci(molecule): skip the Molecule runner when no scenario is selected
A pull request that selects no scenario still took the single Molecule
runner slot to pull the controller image, select nothing and exit.

The workflow now has three jobs. select runs the selector from main's
copy in a job container on kamino-docker, in the molecule-controller pin,
and outputs the selected list. scenarios runs it on kamino-molecule and
is skipped when the list is empty. result runs always() and is the one
job to require: it fails unless select passed and scenarios passed or
was skipped for an empty list, because Gitea counts a skipped job as
passing. Scheduled and dispatched runs still select every scenario.

container.image cannot read env, so the controller pin is written in all
three jobs; a test holds the copies equal. The pin moves to 0.1.1, which
has git for the select job's checkout. Branch protection must then
require "Molecule / Result (pull_request)".

Closes #433

Assisted-by: Claude Code
2026-12-01 23:20:01 +00:00