CI: set up Node in nightly + release jobs (fix npm not found turning main red)#6206
Conversation
build-sign-notarize-nightly has been red across recent main commits: the job can land on a self-hosted macOS runner (the iOS-CI minis match the same MACOS_RUNNER_15/warp label) that has no npm on PATH, so 'npm install --global create-dmg' fails with exit 127 'npm: command not found'. No workflow used setup-node; the runners were assumed to ship npm. Add a pinned actions/setup-node (v6.4.0, node 20) before Install build deps in both nightly.yml and release.yml so the job is self-sufficient on any runner. The create-dmg install stays pinned to CREATE_DMG_VERSION=8.0.0 (pin guard tests/test_ci_create_dmg_pinned.sh still passes).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo macOS CI workflow files ( ChangesNode.js Setup in macOS CI Workflows
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 inconclusive)
✅ Passed checks (19 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR fixes the
Confidence Score: 5/5Workflow-only change that adds a single, well-scoped setup step to two CI jobs; no production code is touched. Both additions are minimal and correctly scoped: the action is pinned to a full commit SHA (matching the existing pinning convention in these files), node 20 is a stable LTS version, and each new step's if guard is identical to the Install build deps step it immediately precedes, so they can never diverge. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Job starts on macOS runner] --> B{Runner has npm?}
B -- Before fix --> C[npm: command not found ❌]
B -- After fix --> D["Set up Node\n(actions/setup-node@v6.4.0)"]
D --> E["Install build deps\n(npm install --global create-dmg@8.0.0)"]
E --> F[Build / Sign / Notarize ✅]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[Job starts on macOS runner] --> B{Runner has npm?}
B -- Before fix --> C[npm: command not found ❌]
B -- After fix --> D["Set up Node\n(actions/setup-node@v6.4.0)"]
D --> E["Install build deps\n(npm install --global create-dmg@8.0.0)"]
E --> F[Build / Sign / Notarize ✅]
Reviews (1): Last reviewed commit: "CI: set up Node in nightly + release bui..." | Re-trigger Greptile |
Why
build-sign-notarize-nightlyis red on main (and has been across recent commits: fce1524, #6199's 723329f, #6102's 50ae246). The job lands on a self-hosted macOS runner (the iOS-CI minis match the sameMACOS_RUNNER_15/warp label) that has nonpmon PATH, so the pinnednpm install --global create-dmg@${CREATE_DMG_VERSION}fails withnpm: command not found(exit 127).No workflow used
setup-node; runners were assumed to ship npm.Fix
Add a pinned
actions/setup-node@v6.4.0(node 20) beforeInstall build depsin bothnightly.ymlandrelease.yml, so the job is self-sufficient regardless of which runner picks it up. Thecreate-dmginstall stays pinned toCREATE_DMG_VERSION=8.0.0;tests/test_ci_create_dmg_pinned.shstill passes.Workflow-only change.
🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Low Risk
Workflow-only CI change; no application, signing, or release artifact logic is modified beyond ensuring npm is available for the existing create-dmg install.
Overview
Fixes nightly and release macOS jobs failing on self-hosted runners where
npmis not on PATH, which broke the existing pinnednpm install --global create-dmg@${CREATE_DMG_VERSION}step withnpm: command not found.Adds a Set up Node step (
actions/setup-node@v6.4.0, Node 20) immediately before Install build deps innightly.ymlandrelease.yml, using the sameifguards as the surrounding build steps. Thecreate-dmgversion pin and install command are unchanged.Reviewed by Cursor Bugbot for commit 21c72d8. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Set up Node in nightly and release build jobs to fix “npm: command not found” on self-hosted macOS runners. This makes the
create-dmginstall reliable and keeps CI green.actions/setup-node@v6.4.0(Node 20) before “Install build deps” innightly.ymlandrelease.yml.npmis available on all runners;create-dmgstays pinned at8.0.0.Written for commit 21c72d8. Summary will update on new commits.
Summary by CodeRabbit