Skip to content

chore: optimize CI pnpm setup#80

Merged
chenjiahan merged 1 commit into
mainfrom
codex/optimize-ci-pnpm-action-20260609
Jun 10, 2026
Merged

chore: optimize CI pnpm setup#80
chenjiahan merged 1 commit into
mainfrom
codex/optimize-ci-pnpm-action-20260609

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

Summary

This PR aligns the GitHub Actions pnpm setup with the current Rsbuild workflow pattern from web-infra-dev/rsbuild#7856.

  • Replace corepack/manual pnpm install steps with pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 and run_install: true.
  • Explicitly disable actions/setup-node package manager caching with package-manager-cache: false.
  • Keep browser installation commands as separate post-install steps where needed.

@chenjiahan chenjiahan marked this pull request as ready for review June 9, 2026 03:57
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR updates three GitHub Actions workflows (lint, main, and release) to standardize pnpm dependency installation. Each workflow's setup-node action is configured with package-manager-cache: false to disable automatic caching. The previous manual dependency installation approach using corepack enable and pnpm i is replaced with the dedicated pnpm/action-setup action, which handles pnpm setup and runs dependency installation automatically via the run_install: true configuration option.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title clearly describes the main change—optimizing CI pnpm setup—which directly aligns with the changeset that replaces corepack with pnpm/action-setup across three workflow files.
Description check ✅ Passed The description is directly related to the changeset, clearly documenting the pnpm setup optimization and the specific changes made across GitHub Actions workflows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/optimize-ci-pnpm-action-20260609

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
.github/workflows/main.yml (2)

37-37: 💤 Low value

Consider using pnpm test for consistency.

The workflow now uses pnpm/action-setup for dependency management, but the test command still uses npm test. While this works (npm can run package.json scripts), using pnpm test would be more consistent with the pnpm-first approach this PR establishes.

🤖 Prompt for 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.

In @.github/workflows/main.yml at line 37, Update the GitHub Actions step that
runs tests to use pnpm instead of npm for consistency with the pnpm setup;
specifically replace the run command that currently invokes "npm test --
--forceExit || npm test -- --forceExit || npm test -- --forceExit" with an
equivalent "pnpm test" invocation (preserving the forced-exit / retry behavior
if needed) so the workflow uses pnpm for running scripts in the same way it uses
pnpm/action-setup to install dependencies.

31-34: 💤 Low value

Consider clarifying the step name for consistency.

Similar to the lint workflow, the step name "Install Pnpm" doesn't reflect that run_install: true also installs dependencies. Consider "Install Pnpm and Dependencies" for clarity across workflows.

🤖 Prompt for 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.

In @.github/workflows/main.yml around lines 31 - 34, Rename the workflow step
whose name string is "Install Pnpm" (the step that uses
pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 and sets run_install:
true) to "Install Pnpm and Dependencies" so the step name clearly reflects that
it also installs project dependencies and matches naming used in the lint
workflow.
.github/workflows/release.yml (1)

29-32: 💤 Low value

Consider clarifying the step name for consistency.

For consistency with the other workflows, consider renaming this step to "Install Pnpm and Dependencies" since run_install: true performs both actions.

🤖 Prompt for 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.

In @.github/workflows/release.yml around lines 29 - 32, Rename the GitHub
Actions step currently labeled "Install Pnpm" to "Install Pnpm and Dependencies"
to reflect that run_install: true both installs pnpm and runs dependency
installation; update the step's name (the YAML key "name" for the step that uses
pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 and has with:
run_install: true) accordingly so it matches naming conventions in the other
workflows.
🤖 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/lint.yml:
- Around line 27-30: Update the pinned pnpm/action-setup reference so the tag
and SHA match: either change the comment suffix to the actual SHA referenced
(keep uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 and
update the trailing comment) or replace the uses value with the correct SHA for
v6.0.8 (d15e628ca66d93ee5f352c71671a7bc6a97af5c9) to make the pin consistent;
also optionally rename the step label "Install Pnpm" to "Install Pnpm and
Dependencies" to reflect that run_install: true installs deps.

---

Nitpick comments:
In @.github/workflows/main.yml:
- Line 37: Update the GitHub Actions step that runs tests to use pnpm instead of
npm for consistency with the pnpm setup; specifically replace the run command
that currently invokes "npm test -- --forceExit || npm test -- --forceExit ||
npm test -- --forceExit" with an equivalent "pnpm test" invocation (preserving
the forced-exit / retry behavior if needed) so the workflow uses pnpm for
running scripts in the same way it uses pnpm/action-setup to install
dependencies.
- Around line 31-34: Rename the workflow step whose name string is "Install
Pnpm" (the step that uses
pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 and sets run_install:
true) to "Install Pnpm and Dependencies" so the step name clearly reflects that
it also installs project dependencies and matches naming used in the lint
workflow.

In @.github/workflows/release.yml:
- Around line 29-32: Rename the GitHub Actions step currently labeled "Install
Pnpm" to "Install Pnpm and Dependencies" to reflect that run_install: true both
installs pnpm and runs dependency installation; update the step's name (the YAML
key "name" for the step that uses
pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 and has with:
run_install: true) accordingly so it matches naming conventions in the other
workflows.
🪄 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: 28cd359b-c05d-4ddb-a95e-4da90abc8428

📥 Commits

Reviewing files that changed from the base of the PR and between d95ebdd and dffb98f.

📒 Files selected for processing (3)
  • .github/workflows/lint.yml
  • .github/workflows/main.yml
  • .github/workflows/release.yml

Comment thread .github/workflows/lint.yml
@chenjiahan chenjiahan merged commit 63746b4 into main Jun 10, 2026
4 checks passed
@chenjiahan chenjiahan deleted the codex/optimize-ci-pnpm-action-20260609 branch June 10, 2026 02:54
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