Skip to content

chore(ci): derive workflow matrices from the root workspaces list - #5638

Draft
svozza wants to merge 1 commit into
mainfrom
chore/5637-derive-ci-matrices
Draft

chore(ci): derive workflow matrices from the root workspaces list#5638
svozza wants to merge 1 commit into
mainfrom
chore/5637-derive-ci-matrices

Conversation

@svozza

@svozza svozza commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Three workflows hardcoded which packages to lint, unit-test and e2e-test, while the layer build and release gate already derived their lists from the root workspaces. This PR makes CI read the same source, so adding a workspace to the root package.json is all a new package needs. Deriving the list surfaced that packages/signer was absent from the unit-test matrix and had never had a unit-test job in CI.

Changes

  • Add .github/scripts/list_workspaces.js, which lists non-private packages/* workspaces, workspaces with e2e suites, or workspaces with LMI suites as a sorted JSON array. It fails loudly on glob workspace patterns, empty results, and workspaces whose e2e suites lack the script the matrix job runs. It is written as ESM and depends on Maintenance: convert the scripts in .github/scripts to ESM #5639 converting .github/scripts to ESM; until that lands the resolve-workspaces job fails on the import syntax.
  • reusable-run-linting-check-and-unit-tests.yml: new resolve-workspaces job feeds the code-quality matrix through fromJSON; the unit-tests-complete aggregate also depends on it so a resolver failure is reported rather than passing as nothing ran.
  • run-e2e-tests.yml: same resolver drives both the utilities and LMI matrices. Both reproduce the previous hardcoded lists exactly.
  • quality_check.yml: now calls the reusable workflow instead of carrying a second, drifted copy of the matrix. It listens to merge_group and so becomes active once merge queues are enabled, reporting the same run-unit-tests / unit-tests-complete context that branch protection already requires.
  • packages/signer: test:unit:types pointed at a tests/types directory that does not exist and always failed; it now uses the same echo 'Not Implemented' placeholder as the other packages without type tests.
  • docs/maintainers.md: the new-package checklist now says to add the workspace to the root package.json and nothing else.

Not in scope: publish-package.yml still hardcodes a stale package choice list, has never run, and uses NPM_TOKEN; it should be removed or repaired separately. The root tsconfig.json references list has also drifted and is a separate fix.

Blocked by: #5639

Issue number: closes #5637


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L PRs between 100-499 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maintenance: derive CI workflow matrices from the workspace list instead of hardcoding them

1 participant