The best way to control Claude Code, Codex and more from any computer or phone
ci: cache Chromium for server test shards (#19632)
maria committed
Oct 15, 2026 at 23:39 UTC
93176616f4365d989943fec39452ba38d3c341ac
1 file changed
+24
-1
.github/workflows/ci.yml
+24
-1
@@ -325,9 +325,32 @@ jobs:
325
# No Electron setup here: `t3` (apps/server) has no Electron dependency
326
# and none of its tests touch the runtime. Only the non-server `test`
327
# job, which covers @t3tools/desktop, needs the download.
328
+ # Cache the pinned browser and skip apt unless shared libraries are missing.
329
+ - name: Resolve Playwright version
330
+ id: playwright_version
331
+ if: steps.changes.outputs.test_server != 'false'
332
+ run: echo "version=$(node -p "require('./apps/server/node_modules/playwright-core/package.json').version")" >> "$GITHUB_OUTPUT"
333
+
334
+ - name: Cache Chromium
335
+ id: chromium_cache
336
+ if: steps.changes.outputs.test_server != 'false'
337
+ uses: actions/cache@v6
338
+ with:
339
+ path: ~/.cache/ms-playwright
340
+ key: playwright-chromium-shell-${{ runner.os }}-${{ runner.arch }}-${{ steps.playwright_version.outputs.version }}
341
+
342
- name: Install Chromium for server browser integration tests
343
+ if: steps.changes.outputs.test_server != 'false' && steps.chromium_cache.outputs.cache-hit != 'true'
344
+ run: node apps/server/node_modules/playwright-core/cli.js install --only-shell chromium
345
+
346
+ - name: Install missing Chromium system dependencies
347
if: steps.changes.outputs.test_server != 'false'
330
- run: node apps/server/node_modules/playwright-core/cli.js install --with-deps --only-shell chromium
348
+ run: |
349
+ browser=$(find "$HOME/.cache/ms-playwright" -name chrome-headless-shell -type f -print -quit)
350
+ test -n "$browser"
351
+ if ldd "$browser" | grep '=> not found'; then
352
+ node apps/server/node_modules/playwright-core/cli.js install-deps chromium
353
+ fi
354
355
- name: Test
356
if: steps.changes.outputs.test_server != 'false'