Skip to content

Commit 11ec640

Browse files
committed
fix: add missing package manager detection in benchmarks job
- Add detect-package-manager step to benchmarks job - Add pnpm setup step - Fix cache configuration to use detected package manager - Resolves exit code 127 error in CI/CD pipeline
1 parent 72edfdb commit 11ec640

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

‎.github/workflows/quality.yml‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,35 @@ jobs:
350350
- name: 📥 Checkout code
351351
uses: actions/checkout@v4
352352

353+
- name: Detect package manager
354+
id: detect-package-manager
355+
run: |
356+
if [ -f "${{ github.workspace }}/pnpm-lock.yaml" ]; then
357+
echo "manager=pnpm" >> $GITHUB_OUTPUT
358+
echo "command=install --frozen-lockfile" >> $GITHUB_OUTPUT
359+
exit 0
360+
elif [ -f "${{ github.workspace }}/yarn.lock" ]; then
361+
echo "manager=yarn" >> $GITHUB_OUTPUT
362+
echo "command=install" >> $GITHUB_OUTPUT
363+
exit 0
364+
elif [ -f "${{ github.workspace }}/package-lock.json" ]; then
365+
echo "manager=npm" >> $GITHUB_OUTPUT
366+
echo "command=ci" >> $GITHUB_OUTPUT
367+
exit 0
368+
else
369+
echo "Unable to determine package manager"
370+
exit 1
371+
fi
372+
- name: Setup pnpm
373+
if: steps.detect-package-manager.outputs.manager == 'pnpm'
374+
uses: pnpm/action-setup@v4
375+
with:
376+
version: 10.19.0
353377
- name: 📦 Setup Node.js
354378
uses: actions/setup-node@v4
355379
with:
356380
node-version: "22"
357-
cache: "npm"
381+
cache: ${{ steps.detect-package-manager.outputs.manager }}
358382

359383
- name: 📥 Install dependencies
360384
run: |

0 commit comments

Comments
 (0)