ci(molecule): fail the Molecule result when select's output is lost
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
This commit is contained in:
1 parent
2d1f142662
commit
479efe1ddc
3 files changed
+61
-23
No files matched your search
@@ -79,10 +79,11 @@ issue.
|
||||
pin pull request. *Held:* review.
|
||||
- **Molecule has three jobs: `select`, `scenarios` and `result`.** `select` runs the selector in
|
||||
a job container on `kamino-docker`, in the `molecule-controller` pin (never the `ci` pin, whose
|
||||
bumps would then select every scenario), and outputs the selected directories. `scenarios`
|
||||
runs them on `kamino-molecule` and is skipped when the list is empty. `result` (check
|
||||
`Molecule / Result (pull_request)`) is the required check: it runs `if: always()` and fails
|
||||
unless `select` passed and `scenarios` passed or was skipped for an empty list. The
|
||||
bumps would then select every scenario), and outputs the selected directories, or `none`.
|
||||
`scenarios` runs them on `kamino-molecule` and is skipped for `none` or an empty output.
|
||||
`result` (check `Molecule / Result (pull_request)`) is the required check: it runs
|
||||
`if: always()` and fails unless `select` passed and `scenarios` passed or was skipped for
|
||||
`none`, so a lost output fails it. The
|
||||
controller pin is written in all three jobs, because `container.image` cannot read `env`.
|
||||
*Why:* a pull request that selects nothing takes no Molecule runner slot, and a skipped job
|
||||
counts as passing in Gitea, so only a job that always runs can be required. *Held:* control:
|
||||
|
||||
Reference in new issue
Block a user