From 1b97fb93968166112b1f93bb7b1efdda8e8daa38 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 25 Feb 2026 11:13:33 -0700 Subject: [PATCH] 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. --- .github/workflows/benchmark.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index b6c07b70..4d5b7d22 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -28,8 +28,10 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "22" + cache: "npm" - - run: npm install + - name: Install dependencies + run: npm ci --prefer-offline --no-audit --no-fund - name: Run build benchmark run: node scripts/benchmark.js 2>/dev/null > benchmark-result.json @@ -91,8 +93,10 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "22" + cache: "npm" - - run: npm install + - name: Install dependencies + run: npm ci --prefer-offline --no-audit --no-fund - name: Cache HuggingFace models uses: actions/cache@v4 @@ -166,8 +170,10 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "22" + cache: "npm" - - run: npm install + - name: Install dependencies + run: npm ci --prefer-offline --no-audit --no-fund - name: Run query benchmark run: node scripts/query-benchmark.js 2>/dev/null > query-benchmark-result.json @@ -229,8 +235,10 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "22" + cache: "npm" - - run: npm install + - name: Install dependencies + run: npm ci --prefer-offline --no-audit --no-fund - name: Run incremental benchmark run: node scripts/incremental-benchmark.js 2>/dev/null > incremental-benchmark-result.json