ci(molecule): run only the scenarios of the roles a pull request changes
A pull request now runs the scenarios of the roles it touches, none when it touches only paths no scenario reads, and everything for any other file, for every push to main and for manual dispatch. The job stays unconditional so Molecule can remain a required check. scripts/select_molecule_scenarios.py makes the choice and is run from the base branch's copy, so a pull request cannot edit its own rules. A changed role that exists but has no scenario fails instead of passing with nothing tested. The scenario loop no longer gives molecule the list as stdin, which a child could have drained, and fails when it ran fewer scenarios than were selected. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
This commit is contained in:
1 parent
2721509cde
commit
4d330d41c7
5 files changed
+480
-20
No files matched your search
+3
-2
@@ -53,8 +53,9 @@ outside contributions:
|
||||
|
||||
- Protect the `v*` tags so only maintainers can create them. A tag run uses the
|
||||
workflow files of the tagged commit and may receive organisation secrets.
|
||||
- Protect `main`: pull request required, with the `Lint` and `Build` checks. Molecule is not a required
|
||||
check: its path filter would leave the check pending forever on a pull request that touches no role.
|
||||
- Protect `main`: pull request required, with the `Lint` and `Build` checks. Molecule has no path filter
|
||||
on pull requests (the job always starts and chooses its scenarios itself), so it can be made a required
|
||||
check as well; that is the operator's decision.
|
||||
- The image workflow (`.gitea/workflows/image.yml`) tries the Actions job token first;
|
||||
Gitea 28 refuses it for an organisation's packages, so it pushes with the organisation secrets
|
||||
`PACKAGE_PUSH_USER` and `PACKAGE_PUSH_TOKEN` (a bot user with write access to the
|
||||
|
||||
Reference in new issue
Block a user