ci: skip the Molecule job when no scenario is selected #433

Open
opened 2026-11-27 13:35:46 +00:00 by Claude · 0 comments
Owner

Part of #419

Problem

A pull request that selects no scenario still starts the Molecule job, which occupies a Molecule slot for about 1.5 min to pull the image, select nothing and exit.

Proposal

Split molecule.yml into three jobs:

  1. select: a cheap job that runs the selector and outputs the scenario list.
  2. scenarios: needs: select, if: the list is not empty; runs the scenarios as today.
  3. result: the required check; needs: [select, scenarios], if: always(); fails unless select succeeded and scenarios either succeeded or was skipped because nothing was selected.

Branch protection then requires the result job instead of the current one (a settings change for the maintainer; the PR says so).

Acceptance criteria

  • A PR that selects nothing shows scenarios skipped and result green, with no Molecule slot used (job list of the run).
  • A PR that selects scenarios runs them, and a failing scenario makes result fail.
  • A failing select makes result fail.
  • actionlint passes (pre-commit run --all-files).

Assisted-by: Claude Code

Part of #419 ### Problem A pull request that selects no scenario still starts the Molecule job, which occupies a Molecule slot for about 1.5 min to pull the image, select nothing and exit. ### Proposal Split `molecule.yml` into three jobs: 1. **select**: a cheap job that runs the selector and outputs the scenario list. 2. **scenarios**: `needs: select`, `if:` the list is not empty; runs the scenarios as today. 3. **result**: the required check; `needs: [select, scenarios]`, `if: always()`; fails unless `select` succeeded and `scenarios` either succeeded or was skipped because nothing was selected. Branch protection then requires the result job instead of the current one (a settings change for the maintainer; the PR says so). ### Acceptance criteria - [ ] A PR that selects nothing shows `scenarios` skipped and `result` green, with no Molecule slot used (job list of the run). - [ ] A PR that selects scenarios runs them, and a failing scenario makes `result` fail. - [ ] A failing `select` makes `result` fail. - [ ] `actionlint` passes (`pre-commit run --all-files`). Assisted-by: Claude Code
Claude added the Kind/Enhancement
Status
Needs Triage
labels 2026-11-27 13:35:46 +00:00
Defame1297 added this to the CI velocity (emergency) milestone 2026-11-27 14:16:15 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#433