fix(ci): add build step to insider publish test job#722
fix(ci): add build step to insider publish test job#722tamirdresher wants to merge 1 commit intodevfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes the insider publish workflow’s failing test job by ensuring build outputs (dist/) exist before running tests in a fresh checkout, which is required for Node subpath export resolution.
Changes:
- Add an explicit
npm run buildstep to the insider publish workflow’stestjob beforenpm test.
| - name: Build (required for subpath export resolution) | ||
| run: npm run build | ||
|
|
There was a problem hiding this comment.
This new build step makes the workflow run npm run build in both the build job (line 27) and again in the test job, which doubles build time without sharing artifacts. Consider either removing the standalone build job/needs: build, or uploading build artifacts in build and downloading them in test instead of rebuilding.
| - name: Build (required for subpath export resolution) | ||
| run: npm run build | ||
|
|
There was a problem hiding this comment.
Since the test job now builds, it’s more important that the Node version here matches the repo’s supported engines. package.json specifies engines.node >=22.5.0, but this workflow matrix uses Node 20; consider bumping this workflow to a supported Node version (or adjusting engines if 20 is intended to be supported).
Bump insider publish workflow to Node 22 and add build step. Co-authored-by: tamirdresher <tamirdresher@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🚀 Full Squad Review — fix(ci): add build step to insider publish test jobDomain: ci/insider-publish
All 21 squad members reviewed and approved. |
bec223c to
da4fc0e
Compare
🚀 Squad Team Review — PR #722Fixed insider publish workflow: Node 20→22, added build step before tests. 1 file, +6/-3. |
|
📋 PR Lifecycle: Team review complete. Labeled \squad:pr-reviewed. Waiting for Dina's review. Add \squad:pr-dina-approved\ when ready to proceed. |
The insider publish workflow's test job runs in a fresh checkout without \dist/\ files, causing \ERR_MODULE_NOT_FOUND\ for subpath exports that resolve to \dist/.
Adding a build step before tests fixes the resolution.
Root cause: The \ est\ job depends on \�uild\ but does a fresh checkout without downloading build artifacts. Subpath exports like @bradygaster/squad-cli/core/init\ and @bradygaster/squad-sdk/ralph/rate-limiting\ point to \dist/\ files that don't exist in a source-only checkout.
Fix: Add
pm run build\ before
pm test\ in the test job.