-
Notifications
You must be signed in to change notification settings - Fork 4
chore: Use .nvmrc for Node version in CI/CD workflows and npm install in post-checkout hook #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…t-checkout hook - Update all workflow files (ci.yml, package.yml, deps.yml, copilot-setup-steps.yml) to use node-version-file: '.nvmrc' instead of hardcoded NODE_VERSION - Remove NODE_VERSION environment variable from workflow files - Change post-checkout hook from npm ci to npm install for local development - All CI workflows continue to use npm ci as expected
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
|
📝 WalkthroughWalkthroughSwitches GitHub Actions Node.js setup from using a top-level Sequence Diagram(s)sequenceDiagram
autonumber
participant GH as GitHub Actions
participant SetupNode as actions/setup-node
participant Repo as Repository
note over GH,Repo #D6EAF8: Previous flow (env variable)
GH->>SetupNode: node-version: ${{ env.NODE_VERSION }}
SetupNode->>GH: Install Node (version from env)
GH->>Repo: run job steps
par New flow (reads file)
note over GH,Repo #FDEBD0: Updated flow (node-version-file)
GH->>Repo: read .nvmrc
GH->>SetupNode: node-version-file: '.nvmrc'
SetupNode->>GH: Install Node (version from .nvmrc)
GH->>Repo: run job steps
end
Possibly related PRs
Suggested reviewers
Pre-merge checks✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-09-03T13:01:49.096ZApplied to files:
🔇 Additional comments (1)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #92 +/- ##
=====================================
Coverage 71% 71%
=====================================
Files 523 523
Lines 39001 39001
Branches 4905 4905
=====================================
Hits 27834 27834
Misses 9542 9542
Partials 1625 1625 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/ci.yml(7 hunks).github/workflows/copilot-setup-steps.yml(1 hunks).github/workflows/deps.yml(2 hunks).github/workflows/package.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Build & Test
- GitHub Check: Build & Package Extension
- GitHub Check: copilot-setup-steps
- GitHub Check: copilot-setup-steps
🔇 Additional comments (3)
.github/workflows/deps.yml (1)
26-32: Both jobs correctly reference.nvmrcfor Node version.Consistent with changes across other workflows.
Also applies to: 59-63
.github/workflows/package.yml (1)
27-33: Setup-node correctly uses.nvmrcfor Node version.Consistent with other workflows.
.github/workflows/ci.yml (1)
28-34: Workflow updates verified..nvmrcexists with pinned version 22.15.1.All seven job updates consistently reference the
.nvmrcfile correctly. The version pin is explicit and valid foractions/setup-node@v5.
Changes: - Updated CD workflow (package.yml) to use npm install - Updated deps workflow (deps.yml) to use npm install - Updated copilot-setup-steps workflow to use npm install - Updated GitHub actions (npm-ci, build-vsix) to use npm install - Updated Azure pipeline files (stable, pre-release) to use npm install - Updated devcontainer files to use npm install in comments - CI workflow files (ci.yml) continue to use npm ci as expected This ensures npm ci is only used in CI environments where reproducible builds are critical, while npm install is used everywhere else for flexibility.
e40fffb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
♻️ Duplicate comments (1)
.github/workflows/copilot-setup-steps.yml (1)
41-46: Step name still references removed environment variable.The step name references
${{env.NODE_VERSION}}which no longer exists (removed in this PR). Update the step name to reflect the actual behavior.- - name: Use Node ${{env.NODE_VERSION}} + - name: Setup Node.js
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (9)
.devcontainer/dev-with-python/devcontainer.json(1 hunks).devcontainer/dev/devcontainer.json(1 hunks).github/actions/build-vsix/action.yml(1 hunks).github/actions/npm-ci/action.yml(1 hunks).github/workflows/copilot-setup-steps.yml(2 hunks).github/workflows/deps.yml(2 hunks).github/workflows/package.yml(1 hunks)build/azure-pipeline.pre-release.yml(1 hunks)build/azure-pipeline.stable.yml(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-07T15:02:51.813Z
Learnt from: Artmann
PR: deepnote/vscode-deepnote#22
File: CONTRIBUTING.md:45-62
Timestamp: 2025-10-07T15:02:51.813Z
Learning: The vscode-deepnote project uses npm for package management, not pnpm. All dependency installation and script execution should use npm commands (e.g., npm ci, npm run).
Applied to files:
.github/workflows/package.yml.github/workflows/deps.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: copilot-setup-steps
- GitHub Check: Build & Package Extension
- GitHub Check: Build & Test
- GitHub Check: copilot-setup-steps
🔇 Additional comments (4)
.devcontainer/dev-with-python/devcontainer.json (1)
36-36: LGTM.Using
npm installin devcontainer postCreateCommand is appropriate for local development flexibility..devcontainer/dev/devcontainer.json (1)
22-22: LGTM.For development environments,
npm installis the right choice..github/actions/build-vsix/action.yml (1)
12-13: File not located; cannot verify code state.The file
.github/actions/build-vsix/action.ymlcould not be found in the repository. Without access to the actual file, I cannot confirm whether the npm ci → npm install swap occurred or validate the comment text.npm ci is designed for CI/CD with deterministic builds (requires lockfile, errors on mismatch, never mutates lockfile), while npm install rewrites the lockfile and may install new versions—so the review's technical concern is valid if the swap happened. But I need you to confirm the file exists and show the current state.
Please verify: Does
.github/actions/build-vsix/action.ymlexist in this repository? If so, paste its content or confirm the file path.build/azure-pipeline.stable.yml (1)
70-71: Review comment is based on incomplete context; change is intentional.The commit
e40fffb9explicitly states "Update npm ci to npm install everywhere except CI workflow files." This was a deliberate team decision, not an oversight. The team distinguished between CI workflows (which retain npm ci) and release pipelines (which use npm install with --foreground-scripts). The --foreground-scripts flag indicates a specific build requirement.Since the change reflects informed architectural choice, no action needed.
CI workflow files should use npm ci for reproducible builds: - package.yml (CD workflow) - deps.yml (dependency checking) - copilot-setup-steps.yml Non-workflow files continue to use npm install: - GitHub actions (npm-ci, build-vsix) - Azure pipelines (stable, pre-release) - Post-checkout git hook - Devcontainer files
All build and deployment pipelines should use npm ci for reproducible builds: - .github/actions/npm-ci/action.yml - .github/actions/build-vsix/action.yml - build/azure-pipeline.stable.yml - build/azure-pipeline.pre-release.yml Only the post-checkout git hook and devcontainer files now use npm install.
Changed all references from npm ci to npm install in documentation: - Setup instructions - Typical workflow example - Local build instructions This aligns with the change to use npm install for local development while CI workflows continue to use npm ci for reproducible builds.
2419d9f
Summary
Standardizes Node.js version management across the repository by using
.nvmrcinstead of hardcoded environment variables, and updates documentation to reflectnpm installusage for local development.Link to Devin run: https://app.devin.ai/sessions/3b7b4414be8845d1bde6d8fedb3c734d
Requested by: James Hobbs (james@deepnote.com) / @jamesbhobbs
Changes
1. Node Version Management (.nvmrc adoption)
NODE_VERSIONenvironment variable from all GitHub workflow filesactions/setup-nodesteps to usenode-version-file: '.nvmrc'ci.yml,package.yml,deps.yml,copilot-setup-steps.yml2. Local Development Commands
.husky/post-checkoutfromnpm ci→npm installnpm installfor local development (4 locations)npm installnpm cifor reproducible CI buildsReview Checklist
.nvmrcexists at repo root and contains22.15.1npm installlocally and check for modifications)Important:
npm ci(no changes to install commands in workflows)npm installon every branch switch)Risks
npm install, which may update package-lock.json if versions have driftedSummary by CodeRabbit
Chores
Documentation