Skip to content

feat: make matrix tests the default (issue 74) - #1

Open
bacluc-agent wants to merge 2 commits into
BacLuc:mainfrom
bacluc-agent:issue-74-default-matrix-tests
Open

bacluc-agent wants to merge 2 commits into
BacLuc:mainfrom
bacluc-agent:issue-74-default-matrix-tests

Conversation

@bacluc-agent

@bacluc-agent bacluc-agent commented Oct 20, 2026 •

Copy link
Copy Markdown

Summary

This PR removes the add_matrix cookiecutter option from the commodore-component-template and always generates matrix-based test workflows and Makefile targets. Components now always get the matrix test.yaml workflow; the recursive Makefile targets are named after the tests/<case>.yml paths and remain conditional on add_golden == "y".

Rendering is byte-identical to what the template previously produced with add_matrix=y — components previously generated with add_matrix=n gain the matrix test workflow and the Makefile targets for it, so per the release note they must run make gen-golden-all once after the cruft update.

This is a mirror of bacluc-agent#4 and implements bacluc-agent/agent-vshn-todo#74.

Changes

  • cookiecutter.json: drop the add_matrix option
  • hooks/post_gen_project.py: remove the add_matrix variable and its conditional — when golden tests are enabled, the renovate postUpgradeTasks command is now always make gen-golden-all (previously make gen-golden when add_matrix=n)
  • .github/workflows/test.yaml (template): drop the non-matrix variant
  • {{ cookiecutter.slug }}/.github/workflows/test.yaml and Makefile / Makefile.vars.mk: always render the matrix strategy in the test workflow (and in the golden job); the recursive Makefile targets named after the tests/<case>.yml paths (plus golden-diff-all) are no longer gated on add_matrix and remain conditional on add_golden == "y"

Evidence

  • Template tests run: https://github.com/bacluc-agent/commodore-component-template/actions/runs/39470464570 — 22/22 jobs success (sha 2d891ef)
  • git grep add_matrix HEAD → 0 hits
  • git diff --stat de8e8df..HEAD → 6 files changed, 4 insertions(+), 28 deletions(-)
  • Update check against projectsyn/component-icap-virusscan: cruft update succeeds against this branch (recorded commit 2d891ef, add_matrix dropped from context), rendered-file diff contains only pre-existing drift (checkout v5→v6, release-changelog-builder v5→v6, jsonnetfmt --in-place move) and zero issue-74-related changes; all 3 make test instances and golden-diff-all exit 0

Release note

Components previously generated with add_matrix=n must run make gen-golden-all once after the cruft update to adopt the matrix test workflows and targets.

Closes bacluc-agent/agent-vshn-todo#74

agent added 2 commits October 20, 2026 12:44
Matrix (multi-instance) tests are now generated unconditionally.
bacluc-agent/agent-vshn-todo#74
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant