ci: run Molecule on every same-repo pull request and print the Renovate report shape #46

Merged
Defame1297 merged 1 commits from ci/molecule-on-all-prs into main 2026-10-26 20:14:15 +00:00
3 changed files with 16 additions and 10 deletions

No files matched your search

+5 -10
View File
@@ -21,13 +21,6 @@ on: # yamllint disable-line rule:truthy
pull_request:
branches:
- main
paths:
- 'roles/**'
- 'extensions/**'
- 'plugins/**'
- 'meta/**'
- 'galaxy.yml'
- '.gitea/workflows/molecule.yml'
push:
branches:
- main
@@ -50,12 +43,14 @@ concurrency:
jobs:
molecule:
# Same-repo, non-bot branches only; a push to main or a manual dispatch always runs.
# Same-repo branches only (bot branches included: a Renovate pin pull request is what tests a new
# image); a push to main or a manual dispatch always runs. No paths filter on pull requests, so
# that Molecule can be a required check: a required check that a pull request never starts would
# block it. A fork pull request is skipped (and the repository takes none).
if: >-
github.repository == 'mortis/kamino' &&
(github.event_name != 'pull_request' ||
(github.event.pull_request.head.repo.full_name == github.repository &&
!startsWith(github.head_ref, 'renovate/')))
github.event.pull_request.head.repo.full_name == github.repository)
runs-on: [kamino-molecule]
timeout-minutes: 30
env:
+9
View File
@@ -103,6 +103,15 @@ jobs:
problems = list(report.get("problems", []))
for repo in report.get("repositories", {}).values():
problems.extend(repo.get("problems", []))
# The shape of the report, once, so that a check on a failed post-upgrade task can be
# written against a real field: top-level keys, then per branch its keys and short values.
print("Renovate report keys: " + ", ".join(sorted(report)))
for name, repo in report.get("repositories", {}).items():
print("repository " + name + " keys: " + ", ".join(sorted(repo)))
for branch in repo.get("branches", []):
print(" branch: " + ", ".join(
k + "=" + str(v)[:60].replace("\n", " ") for k, v in sorted(branch.items())
if k != "upgrades"))
bad = [p for p in problems if p.get("level", 0) >= 50]
for p in bad:
print("::error::Renovate problem: " + str(p.get("msg", "")))
+2
View File
@@ -40,6 +40,8 @@ protection, or create tags: those are the operator's.
- Lint and Build run in the `ci` image. After the checkout they compare the pin files with the
checksums baked into the image: a PR that changes `requirements-dev.txt` or
`.pre-commit-config.yaml` takes the slower path that installs the pinned tools.
- Molecule runs on every same-repo pull request, Renovate's included (a new image is tested by its own pin
pull request), with no path filter, so that it can be a required check. Fork pull requests are skipped.
- Molecule discovers `extensions/molecule/*/` and `roles/*/molecule/*/`. The `image-smoke`
and `image-smoke-2604` scenarios test the molecule images themselves (24.04 and 26.04); a role scenario that
must pass on both takes `image: ${MOLECULE_IMAGE}` or `${MOLECULE_IMAGE_2604}` per platform.