@@ -192,6 +192,41 @@ jobs: |
192 | 192 | if: ${{ !cancelled() && steps.build.outcome == 'success' }} |
193 | 193 | run: node apps/desktop/scripts/verify-preload-bundle.mjs |
194 | 194 |
|
| 195 | + # Browser tests run source modules; this boots the production chunk graph. The |
| 196 | + # desktop build above already produced apps/web/dist, and the client waits about |
| 197 | + # 15s for a session that never comes, so this runs here instead of in Test Web, |
| 198 | + # which gates the whole run. Chromium comes from the cache Test Web shares. |
| 199 | + - name: Resolve Playwright version |
| 200 | + id: playwright_version |
| 201 | + if: ${{ !cancelled() && steps.build.outcome == 'success' && needs.changes.outputs.test_web != 'false' }} |
| 202 | + run: echo "version=$(node -p "require('./apps/web/node_modules/playwright/package.json').version")" >> "$GITHUB_OUTPUT" |
| 203 | + |
| 204 | + - name: Cache Chromium |
| 205 | + id: chromium_cache |
| 206 | + if: ${{ !cancelled() && steps.build.outcome == 'success' && needs.changes.outputs.test_web != 'false' }} |
| 207 | + uses: actions/cache@v6 |
| 208 | + with: |
| 209 | + path: ~/.cache/ms-playwright |
| 210 | + key: playwright-chromium-shell-${{ runner.os }}-${{ runner.arch }}-${{ steps.playwright_version.outputs.version }} |
| 211 | + |
| 212 | + - name: Install Chromium for the built web client boot check |
| 213 | + if: ${{ !cancelled() && steps.build.outcome == 'success' && needs.changes.outputs.test_web != 'false' && steps.chromium_cache.outputs.cache-hit != 'true' }} |
| 214 | + run: node apps/web/node_modules/playwright/cli.js install --only-shell chromium |
| 215 | + |
| 216 | + - name: Install missing Chromium system dependencies |
| 217 | + if: ${{ !cancelled() && steps.build.outcome == 'success' && needs.changes.outputs.test_web != 'false' }} |
| 218 | + run: | |
| 219 | + browser=$(find "$HOME/.cache/ms-playwright" -name chrome-headless-shell -type f -print -quit) |
| 220 | + test -n "$browser" |
| 221 | + if ldd "$browser" | grep '=> not found'; then |
| 222 | + node apps/web/node_modules/playwright/cli.js install-deps chromium |
| 223 | + fi |
| 224 | +
|
| 225 | + - name: Boot the built web client |
| 226 | + if: ${{ !cancelled() && steps.build.outcome == 'success' && needs.changes.outputs.test_web != 'false' }} |
| 227 | + timeout-minutes: 3 |
| 228 | + run: node apps/web/scripts/verify-built-boot.ts |
| 229 | + |
195 | 230 | - name: Typecheck |
196 | 231 | if: ${{ !cancelled() && steps.typecheck.outcome == 'success' }} |
197 | 232 | timeout-minutes: 5 |
@@ -340,12 +375,6 @@ jobs: |
340 | 375 | - name: Test |
341 | 376 | run: vp run --filter @t3tools/web test |
342 | 377 |
|
343 | | - # Browser tests run source modules; this boots the production chunk graph. |
344 | | - - name: Boot the built web client |
345 | | - run: | |
346 | | - vp run --filter @t3tools/web build |
347 | | - node apps/web/scripts/verify-built-boot.ts |
348 | | -
|
349 | 378 | # apps/server sets `fileParallelism: false`, so its test files run strictly |
350 | 379 | # one at a time. Sharding spreads them over separate runners instead of |
351 | 380 | # separate workers, so no two server test files ever share a machine and the |
|