chore: optimize CI pnpm setup#81
Conversation
📝 WalkthroughWalkthroughThis PR standardizes Node.js and pnpm setup across GitHub Actions workflows. Both the CI and release workflows now disable caching in 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 31-34: The workflow pins pnpm/action-setup@0e279bb... but the
inline comment says v6.0.8 and run_install: true doesn't enforce lockfile
determinism; update the action pin to the SHA that actually corresponds to
v6.0.8 (or change the comment to match the pinned SHA) and replace the implicit
run_install: true behavior with an explicit install step that runs pnpm install
--frozen-lockfile (i.e., stop relying on run_install and add a separate run:
pnpm install --frozen-lockfile step after using pnpm/action-setup) so CI fails
on lockfile drift.
In @.github/workflows/release.yml:
- Around line 29-32: The workflow currently uses the pnpm/action-setup step with
the run_install input, which performs installs without --frozen-lockfile; change
behavior by disabling automatic install (set run_install to false on the
pnpm/action-setup step) and add an explicit subsequent run step that executes
the install with a frozen lockfile (run "pnpm recursive install
--frozen-lockfile") so the release uses lockfile-resolved dependencies;
reference the existing pnpm/action-setup step and the run_install input and add
a new run step named something like "Install dependencies (frozen lockfile)" to
perform the frozen install.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 0468f29b-e9c8-4f27-864d-56c08128b6ad
📒 Files selected for processing (2)
.github/workflows/ci.yml.github/workflows/release.yml
Summary
This PR aligns the GitHub Actions pnpm setup with the current Rsbuild workflow pattern from web-infra-dev/rsbuild#7856.
pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093andrun_install: true.actions/setup-nodepackage manager caching withpackage-manager-cache: false.