@devries-cameron20 / t3code-1 / commits / f6ad94d05c
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

ci: cache pnpm packages on Blacksmith sticky disks (#19634)

maria committed Oct 15, 2026 at 23:39 UTC f6ad94d05c9c50e2abf9c425891966b95237d398
2 files changed +62 -25
.github/actions/setup-ci-deps/action.yml new
+57
@@ -0,0 +1,57 @@
1 +name: Setup CI dependencies
2 +description: Install Vite+ dependencies using a Blacksmith sticky pnpm store on Linux.
3 +inputs:
4 + run-install:
5 + description: Install arguments forwarded to setup-vp.
6 + required: false
7 + default: "true"
8 +runs:
9 + using: composite
10 + steps:
11 + # Cache packages only; node_modules and prepare scripts stay fresh each job.
12 + - name: Mount pnpm store
13 + id: sticky
14 + continue-on-error: true
15 + uses: useblacksmith/stickydisk@v1
16 + with:
17 + key: ${{ github.repository }}-ci-pnpm-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'patches/**') }}
18 + path: ${{ runner.temp }}/t3-ci-pnpm-store
19 + # Each job gets a private clone. PRs must not publish into main's snapshot.
20 + commit: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
21 +
22 + - name: Check pnpm store mount
23 + id: store
24 + shell: bash
25 + env:
26 + STICKY_OUTCOME: ${{ steps.sticky.outcome }}
27 + STICKY_STORE_PATH: ${{ runner.temp }}/t3-ci-pnpm-store
28 + PUBLISHES: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
29 + run: |
30 + # stickydisk can return success after falling back to an ordinary directory.
31 + # An empty disk (no pnpm `v*` store from a main snapshot yet) only helps the
32 + # main push that fills it; everyone else keeps the setup-vp cache.
33 + if [[ "$STICKY_OUTCOME" == success ]] && mountpoint -q "$STICKY_STORE_PATH" && test -w "$STICKY_STORE_PATH" \
34 + && { [[ "$PUBLISHES" == true ]] || compgen -G "$STICKY_STORE_PATH/v*" > /dev/null; }; then
35 + echo 'mounted=true' >> "$GITHUB_OUTPUT"
36 + else
37 + echo 'mounted=false' >> "$GITHUB_OUTPUT"
38 + echo '::warning::Sticky pnpm store unavailable or empty; using setup-vp dependency cache.'
39 + fi
40 +
41 + - name: Setup Vite+ with sticky store
42 + if: steps.store.outputs.mounted == 'true'
43 + uses: voidzero-dev/setup-vp@v1
44 + env:
45 + pnpm_config_store_dir: ${{ runner.temp }}/t3-ci-pnpm-store
46 + with:
47 + node-version-file: package.json
48 + cache: false
49 + run-install: ${{ inputs.run-install }}
50 +
51 + - name: Setup Vite+ with cache fallback
52 + if: steps.store.outputs.mounted != 'true'
53 + uses: voidzero-dev/setup-vp@v1
54 + with:
55 + node-version-file: package.json
56 + cache: true
57 + run-install: ${{ inputs.run-install }}
.github/workflows/ci.yml
+5 -25
@@ -80,11 +80,7 @@ jobs:
80 fi
81
82 - name: Setup Vite+
83 - uses: voidzero-dev/setup-vp@v1
84 - with:
85 - node-version-file: package.json
86 - cache: true
87 - run-install: true
83 + uses: ./.github/actions/setup-ci-deps
84
85 - name: Ensure Electron runtime is installed
86 run: vp run --filter @t3tools/desktop ensure:electron
@@ -129,11 +125,7 @@ jobs:
125 ) > "$RUNNER_TEMP/apt.log" 2>&1 < /dev/null &
126
127 - name: Setup Vite+
132 - uses: voidzero-dev/setup-vp@v1
133 - with:
134 - node-version-file: package.json
135 - cache: true
136 - run-install: true
128 + uses: ./.github/actions/setup-ci-deps
129
130 - name: Ensure Electron runtime is installed
131 id: electron
@@ -222,11 +214,7 @@ jobs:
214 ) > "$RUNNER_TEMP/apt.log" 2>&1 < /dev/null &
215
216 - name: Setup Vite+
225 - uses: voidzero-dev/setup-vp@v1
226 - with:
227 - node-version-file: package.json
228 - cache: true
229 - run-install: true
217 + uses: ./.github/actions/setup-ci-deps
218
219 - name: Ensure Electron runtime is installed
220 run: vp run --filter @t3tools/desktop ensure:electron
@@ -274,11 +262,7 @@ jobs:
262 sparse-checkout-cone-mode: false
263
264 - name: Setup Vite+
277 - uses: voidzero-dev/setup-vp@v1
278 - with:
279 - node-version-file: package.json
280 - cache: true
281 - run-install: true
265 + uses: ./.github/actions/setup-ci-deps
266
267 - name: Test
268 run: vp run --filter @t3tools/web test
@@ -316,11 +300,7 @@ jobs:
300
301 - name: Setup Vite+
302 if: steps.changes.outputs.test_server != 'false'
319 - uses: voidzero-dev/setup-vp@v1
320 - with:
321 - node-version-file: package.json
322 - cache: true
323 - run-install: true
303 + uses: ./.github/actions/setup-ci-deps
304
305 # No Electron setup here: `t3` (apps/server) has no Electron dependency
306 # and none of its tests touch the runtime. Only the non-server `test`