Skip to content

Commit 1b97fb9

Browse files
fix: harden benchmark workflow against transient npm failures
Add npm caching to setup-node and switch from bare `npm install` to `npm ci --prefer-offline --no-audit --no-fund` in all 4 benchmark jobs. This prevents transient 403s from the npm registry from failing the workflow.
1 parent f977f9c commit 1b97fb9

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ jobs:
2828
- uses: actions/setup-node@v4
2929
with:
3030
node-version: "22"
31+
cache: "npm"
3132

32-
- run: npm install
33+
- name: Install dependencies
34+
run: npm ci --prefer-offline --no-audit --no-fund
3335

3436
- name: Run build benchmark
3537
run: node scripts/benchmark.js 2>/dev/null > benchmark-result.json
@@ -91,8 +93,10 @@ jobs:
9193
- uses: actions/setup-node@v4
9294
with:
9395
node-version: "22"
96+
cache: "npm"
9497

95-
- run: npm install
98+
- name: Install dependencies
99+
run: npm ci --prefer-offline --no-audit --no-fund
96100

97101
- name: Cache HuggingFace models
98102
uses: actions/cache@v4
@@ -166,8 +170,10 @@ jobs:
166170
- uses: actions/setup-node@v4
167171
with:
168172
node-version: "22"
173+
cache: "npm"
169174

170-
- run: npm install
175+
- name: Install dependencies
176+
run: npm ci --prefer-offline --no-audit --no-fund
171177

172178
- name: Run query benchmark
173179
run: node scripts/query-benchmark.js 2>/dev/null > query-benchmark-result.json
@@ -229,8 +235,10 @@ jobs:
229235
- uses: actions/setup-node@v4
230236
with:
231237
node-version: "22"
238+
cache: "npm"
232239

233-
- run: npm install
240+
- name: Install dependencies
241+
run: npm ci --prefer-offline --no-audit --no-fund
234242

235243
- name: Run incremental benchmark
236244
run: node scripts/incremental-benchmark.js 2>/dev/null > incremental-benchmark-result.json

0 commit comments

Comments
 (0)