File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments