fix(ci): use mounted pnpm store on ARC runners#1081
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the repo’s composite CI setup action to explicitly point pnpm at the ARC runner’s mounted/shared store directory so installs can reuse the RAM-backed cache instead of pnpm’s default per-job store path.
Changes:
- Add a step to set pnpm
store-dirbefore computing the store path used for caching. - Ensure the intended store root directory exists on the runner.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: | | ||
| store_root="${PNPM_STORE_DIR:-/home/runner/.local/share/pnpm/store}" | ||
| mkdir -p "$store_root" | ||
| pnpm config set store-dir "$store_root" --location=user |
There was a problem hiding this comment.
pnpm config set ... --location=user will typically write store-dir=... into the user-level .npmrc, which is also read by npm. This repo runs npm install later (e.g. docs install in the publish workflow), and modern npm emits warnings for unknown keys and may treat them as errors in a future major. Prefer scoping this pnpm-only setting to pnpm’s own config (e.g. --location=global so it writes to pnpm’s rc under XDG config), or set the store dir via an env/CLI flag so npm never sees store-dir in .npmrc.
| pnpm config set store-dir "$store_root" --location=user | |
| pnpm config set store-dir "$store_root" --location=global |
There was a problem hiding this comment.
Addressed in f4e1ace1: this now uses --location=global, so the setting lands in pnpm's own config instead of npm's user rc.
| NODE_OPTIONS: --disable-warning=DEP0169 | ||
| NPM_TOKEN: ${{ inputs.auth-token }} | ||
| run: | | ||
| store_root="${PNPM_STORE_DIR:-/home/runner/.local/share/pnpm/store}" |
There was a problem hiding this comment.
The default store path is hard-coded to /home/runner/.... Since this is a composite action (and the repo’s workflows may eventually run under a different user/home), it would be more robust to default to $HOME/.local/share/pnpm/store (still matching ARC runners) while keeping PNPM_STORE_DIR as the override.
| store_root="${PNPM_STORE_DIR:-/home/runner/.local/share/pnpm/store}" | |
| store_root="${PNPM_STORE_DIR:-$HOME/.local/share/pnpm/store}" |
There was a problem hiding this comment.
Addressed in f4e1ace as well: the default store root now falls back to $HOME/.local/share/pnpm/store, while still allowing PNPM_STORE_DIR to override it.
Summary
Why
Live arc-happyvertical runners expose the persistent pnpm cache at
/home/runner/.local/share/pnpm/store, but pnpm defaults to/home/runner/.pnpm-store/v10unlessstore-diris set explicitly. That means workflow installs miss the shared tmpfs cache and rebuild more work than necessary.