Skip to content

Commit cae7216

Browse files
Boshenclaude
andauthored
ci(musl): replace corepack with oxc-project/setup-node (#367)
## Summary The musl test job runs in a Node Alpine container and used `corepack enable` to bootstrap pnpm. Node 25 unbundles corepack, so the renovate bump from `node:22-alpine3.21` to `node:25-alpine3.21` (#361) fails with `corepack: command not found` (see [run 24967913479](https://github.com/voidzero-dev/vite-task/actions/runs/24967913479/job/73105843537?pr=361)). Use `oxc-project/setup-node@v1.2.0`, which installs pnpm directly and gates the pnpm-store cache to `main` (save on main, restore-only on PRs). Mirrors the existing pattern at `.github/workflows/ci.yml:148-153` (action + follow-up `pnpm install` for test bins). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent bcc9457 commit cae7216

1 file changed

Lines changed: 6 additions & 23 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -132,25 +132,11 @@ jobs:
132132
- name: Run tests
133133
run: ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }}
134134

135-
# For x86_64-apple-darwin on arm64 runner, install x64 node so fspy preload dylib
136-
# (compiled for x86_64) can be injected into node processes running under Rosetta.
137-
# oxc-project/setup-node doesn't support the architecture input, so use
138-
# pnpm/action-setup + actions/setup-node directly.
139-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
140-
if: ${{ matrix.target == 'x86_64-apple-darwin' }}
141-
142-
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
135+
# x86_64-apple-darwin runs on arm64 runner under Rosetta; install x64 Node
136+
# so fspy's x86_64 preload dylib can be injected into spawned node procs.
137+
- uses: oxc-project/setup-node@ab97f03642370d79a7e96dd286bd02a1be40e0ba # v1.3.0
143138
with:
144-
node-version-file: .node-version
145-
architecture: x64
146-
if: ${{ matrix.target == 'x86_64-apple-darwin' }}
147-
148-
- uses: oxc-project/setup-node@4c26e7cb3605b6bdef5450dacd02c434b10fd8ba # v1.2.0
149-
if: ${{ matrix.target != 'x86_64-apple-darwin' }}
150-
151-
# `pnpm install` prepares test bins used in snapshot tests
152-
# Must run after setup-node so correct native binaries are installed
153-
- run: pnpm install
139+
architecture: ${{ matrix.target == 'x86_64-apple-darwin' && 'x64' || '' }}
154140

155141
- name: Run ignored tests
156142
run: ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }} -- --ignored
@@ -201,10 +187,7 @@ jobs:
201187
- name: Run tests
202188
run: cargo test
203189

204-
- name: Install pnpm and Node tools
205-
run: |
206-
corepack enable
207-
pnpm install
190+
- uses: oxc-project/setup-node@ab97f03642370d79a7e96dd286bd02a1be40e0ba # v1.3.0
208191

209192
- name: Run ignored tests
210193
run: cargo test -- --ignored
@@ -225,7 +208,7 @@ jobs:
225208
tools: cargo-shear@1.11.1,cargo-autoinherit@0.1.6
226209
components: clippy rust-docs rustfmt
227210

228-
- uses: oxc-project/setup-node@4c26e7cb3605b6bdef5450dacd02c434b10fd8ba # v1.2.0
211+
- uses: oxc-project/setup-node@ab97f03642370d79a7e96dd286bd02a1be40e0ba # v1.3.0
229212
- run: pnpm oxfmt --check
230213
- run: cargo autoinherit && git diff --exit-code
231214
- run: cargo shear --deny-warnings

0 commit comments

Comments
 (0)