Skip to content

ci: ship an empty literal test matrix that pgpm init fills in - #56

Merged
pyramation merged 1 commit into
mainfrom
feat/ci-literal-matrix
Sep 17, 2026
Merged

pyramation merged 1 commit into
mainfrom
feat/ci-literal-matrix

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Replaces the placeholder matrix in both workspace templates with a literal array that pgpm init maintains (constructive-io/constructive#1845), instead of the CI-time pgpm ls discovery from #53 (reverted in #55). The matrix stays a plain YAML list you can hand-edit.

       matrix:
-        package:
-          - your-module-1
-          - your-module-2
+        # Workspace-relative paths of the packages to test. `pgpm init` adds each
+        # new module here, keeping the list sorted; edit it by hand as you like.
+        package: []
 ...
-        run: cd ./packages/${{ matrix.package }} && pnpm test
+        run: cd ./${{ matrix.package }} && pnpm test

Entries are workspace-relative paths (packages/my-module), so modules outside packages/ work too — each pgpm init inserts packages/<name> sorted, in place, preserving the comment.

Caveat (noted in the file): GitHub rejects an empty literal matrix, so a workspace with zero modules has an invalid ci.yml until its first pgpm init. pgpm init -w (workspace + module) yields a valid workflow immediately. Requires a pgpm release containing constructive#1845 for the auto-fill; older pgpm leaves the array for you to edit by hand.

Scope is the matrix only; the other cleanups from #53 (PGPM_VERSION pin, README path, lint/lint:fix, git add -A, smoke workflow, pnpm-policy packages:) are not re-landed here.

Link to Devin session: https://app.devin.ai/sessions/dd4055c50bcf4b1e8e604211038aaa82
Open in Devin Desktop: https://app.devin.ai/desktop/session/dd4055c50bcf4b1e8e604211038aaa82?variant=devin
Requested by: @pyramation

@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@tenki-reviewer

tenki-reviewer Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Review complete. 🟠 1 high

📍 Findings outside the diff (1) — 🟠 1 high — defects on lines GitHub can't attach comments to

🟠 High — Empty matrix silently skips the test job

The test job's package: [] matrix has zero combinations, and GitHub Actions skips a job with an empty matrix rather than rejecting it, so the job executes no steps and the run still finishes green (pnpm/workspace/.github/workflows/ci.yml:21). The comment above it ("GitHub rejects an empty matrix") is therefore wrong, and every push/PR currently reports success with no tests or supply-chain policy check run; the same empty matrix exists in pgpm/workspace/.github/workflows/ci.yml:22.


This PR introduces CI test workflows for both the pgpm and pnpm workspaces, discovering packages and running tests via a GitHub Actions matrix job. Both workflows are essentially parallel additions that share the same matrix-driving structure.

Files Change
pgpm/workspace/.github/workflows/ci.yml Adds a test job that builds a package matrix and runs each package's tests in a per-package working directory.
pnpm/workspace/.github/workflows/ci.yml Mirrors the same matrix-based test workflow for the pnpm workspace.

The workflow relies on a dynamic matrix built at runtime; if package discovery yields an empty set, the matrix job silently runs with no entries and the workflow passes with false-green signal. This is the highest-risk aspect of the change.

Reviewed commit: ccc1329

@pyramation
pyramation merged commit 0a5dfd1 into main Sep 17, 2026
4 checks passed
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