fix(ci): reuse installed pinned Bun in test workflows

This commit is contained in:
Jinjing
2026-11-09 00:11:18 -08:00
parent f4b438c5d0
commit 1d7ea1708d
3 changed files with 44 additions and 2 deletions
+23 -1
View File
@@ -298,8 +298,19 @@ jobs:
echo 'should_run=true' >> "$GITHUB_OUTPUT"
fi
- name: Setup Bun for tests
- name: Find installed Bun
id: installed-bun
if: steps.test-scope.outputs.should_run != 'false'
shell: bash
working-directory: .
run: |
bun="$GITHUB_WORKSPACE/node_modules/.bin/bun"
if [ -x "$bun" ] && [ "$("$bun" --version)" = "$(cat config/.bun-version)" ]; then
echo "$GITHUB_WORKSPACE/node_modules/.bin" >> "$GITHUB_PATH"
echo 'found=true' >> "$GITHUB_OUTPUT"
fi
- name: Setup Bun for tests
if: steps.test-scope.outputs.should_run != 'false' && steps.installed-bun.outputs.found != 'true'
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version-file: config/.bun-version
@@ -431,7 +442,18 @@ jobs:
run: node scripts/check-tests-typecheck-ratchet.mjs
# Run all golden consumers, including mutant/page-bridge suites; failures name the recording and rpc:record command.
- name: Find installed Bun
id: installed-bun
shell: bash
working-directory: .
run: |
bun="$GITHUB_WORKSPACE/node_modules/.bin/bun"
if [ -x "$bun" ] && [ "$("$bun" --version)" = "$(cat config/.bun-version)" ]; then
echo "$GITHUB_WORKSPACE/node_modules/.bin" >> "$GITHUB_PATH"
echo 'found=true' >> "$GITHUB_OUTPUT"
fi
- name: Setup Bun for tests
if: steps.installed-bun.outputs.found != 'true'
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version-file: config/.bun-version
+11 -1
View File
@@ -183,8 +183,18 @@ jobs:
# Design D7 upgrade and rollback: the last Bun orcad, built from a main commit that shipped
# it, using the current Bun pin beside this checkout's Node slot; hand-over skips once PROTOCOL_VERSION
# moves past the Bun daemon's. Install its pinned dependencies independently of this checkout.
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
- name: Find installed Bun
id: installed-bun
if: runner.os == 'Linux'
shell: bash
run: |
bun="$GITHUB_WORKSPACE/node_modules/.bin/bun"
if [ -x "$bun" ] && [ "$("$bun" --version)" = "$(cat config/.bun-version)" ]; then
echo "$GITHUB_WORKSPACE/node_modules/.bin" >> "$GITHUB_PATH"
echo 'found=true' >> "$GITHUB_OUTPUT"
fi
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
if: runner.os == 'Linux' && steps.installed-bun.outputs.found != 'true'
with:
bun-version-file: config/.bun-version
no-cache: true
+10
View File
@@ -94,7 +94,17 @@ jobs:
run: |
ELECTRON_RUN_AS_NODE=1 "$(node -p "require('electron')")" --version
- name: Find installed Bun
id: installed-bun
shell: bash
run: |
bun="$GITHUB_WORKSPACE/node_modules/.bin/bun"
if [ -x "$bun" ] && [ "$("$bun" --version)" = "$(cat config/.bun-version)" ]; then
echo "$GITHUB_WORKSPACE/node_modules/.bin" >> "$GITHUB_PATH"
echo 'found=true' >> "$GITHUB_OUTPUT"
fi
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
if: steps.installed-bun.outputs.found != 'true'
with:
bun-version-file: config/.bun-version
no-cache: true