Skip to content

ci: build workspace packages before tests (round-trip fix) - #60

Closed
nbkdoesntknowcoding wants to merge 1 commit into
mainfrom
fix/green-ci-build-step
Closed

nbkdoesntknowcoding wants to merge 1 commit into
mainfrom
fix/green-ci-build-step

Conversation

@nbkdoesntknowcoding

Copy link
Copy Markdown
Owner

Follow-up to #59

PR #59 turned the Test check green through the pnpm-setup / env / migration-journal fixes, but it was merged with only its first commit — the workspace-build commit that landed on the branch afterward didn't make it into the squash. As a result the three round-trip steps still fail on main:

Error: Failed to load url @boppl/schema/node
(resolved id: @boppl/schema/node) in .../src/tests/round-trip/helpers.ts.
Does the file exist?

Root cause

The round-trip tests import @boppl/schema/node. That subpath export resolves to packages/schema/dist/node.js, which only exists after the package is built. The workflow installs deps but never builds the workspace libs, and a clean CI checkout has no dist/.

Fix (single step — tests are NOT skipped or quarantined)

Added a Build workspace packages step right after install, mirroring CONTRIBUTING step 2:

- name: Build workspace packages
  run: pnpm -r --filter "./packages/**" build

This produces packages/schema/dist/node.js (+ @boppl/shared) so vitest can resolve the import. The three round-trip steps stay gating (no continue-on-error).

Local verification

  • Deleting packages/{schema,shared}/dist reproduces the exact CI failure.
  • After the build step, all three round-trip steps pass, run exactly as the workflow does:
round-trip/corpus      51 passed (51)
round-trip/fuzz        30 passed (30)
round-trip/full-stack   2 passed (2)

With this, all 13 test steps in Test pass; typecheck/lint remain the only continue-on-error steps (pre-existing, unrelated — documented in #59).

🤖 Generated with Claude Code

Follow-up to #59. That PR was merged with only its first commit; the
workspace-build step from the later commits didn't make it in, so the three
round-trip steps still fail on main with:
  "Failed to load url @boppl/schema/node ... Does the file exist?"

The round-trip tests import @boppl/schema/node (src/tests/round-trip/
helpers.ts). Its "./node" export resolves to ./dist/node.js, which only
exists after building the package. A clean CI checkout has no dist/. Added the
missing "Build workspace packages" step (pnpm -r --filter "./packages/**"
build, mirroring CONTRIBUTING step 2) right after install.

Verified locally: deleting packages/{schema,shared}/dist reproduces the exact
failure; after the build step the three round-trip steps pass — corpus 51,
fuzz 30, full-stack 2. The tests are NOT skipped or quarantined; the fix is
the build step.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: nbkdoesntknowcoding <nischaybk@theboringpeople.in>
@nbkdoesntknowcoding

Copy link
Copy Markdown
Owner Author

Superseded by #61, which includes this same workspace-build step plus the astro 6 + vitest 3 upgrades. Merging #61 greens the Test suite and clears the astro/vitest CVE alerts in one shot.

@nbkdoesntknowcoding
nbkdoesntknowcoding deleted the fix/green-ci-build-step branch July 8, 2026 10:27
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