Skip to content

Commit 32c3b31

Browse files
committed
wip: try with real node
1 parent 3982c34 commit 32c3b31

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/codspeed.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,20 @@ jobs:
108108
- run: pnpm install --frozen-lockfile --prefer-offline
109109
- run: pnpm turbo run build
110110

111+
# FIXME: Resolve node outside of CodSpeed to not be shadowed and
112+
# to not have /usr/bin/env in the script
113+
- name: Resolve node + vitest paths
114+
working-directory: packages/vitest-plugin
115+
run: |
116+
echo "NODE_BIN=$(node -e "console.log(require('fs').realpathSync(process.execPath))")" >> "$GITHUB_ENV"
117+
echo "VITEST=$(node -e "const path=require('path');console.log(path.join(path.dirname(require.resolve('vitest/package.json')),'vitest.mjs'))")" >> "$GITHUB_ENV"
118+
111119
- name: Run macOS-only benchmarks
112120
uses: CodSpeedHQ/action@main
113121
with:
114122
working-directory: packages/vitest-plugin
115-
# Resolve vitest's entry directly so `node` is the only parent in the
116-
# process tree (no system bash/pnpm shim).
117123
run: |
118-
VITEST=$(node -e "const path=require('path');console.log(path.join(path.dirname(require.resolve('vitest/package.json')),'vitest.mjs'))")
119-
node "$VITEST" bench --run macos
124+
"$NODE_BIN" "$VITEST" bench --run macos
120125
mode: walltime
121126
runner-version: branch:cod-2762-samply-sigkills-dsymutil
122127

0 commit comments

Comments
 (0)