Skip to content
TypeScript

ci(release): release tests stop timing out and finish in about 5 minutes (#22524)

Theo Brownefe27e8e3dc12
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 45b33397326..d29d970c75f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -252,6 +252,7 @@ jobs:
# The web suite is the largest outside the server. In the shared Test job it
# started last and ran alone for about 40s after everything else finished.
+ # release.yml mirrors this test, test_web, and test_server split.
test_web:
name: Test Web
needs: changes
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index df8a719f9e7..5d387de16b8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -256,7 +256,7 @@ jobs:
run: vp run typecheck
# Keep tests on their own runners, using the same package split and server
- # shards as CI, so the release check job does not spend its budget on tests.
+ # shards as CI (test, test_web, test_server in ci.yml). Keep the two in sync.
test:
name: Release tests
needs: [preflight]
@@ -286,23 +286,67 @@ jobs:
sudo sed -i 's|http://|https://|g' /etc/apt/blacksmith-ubuntu-mirrors.txt /etc/apt/sources.list.d/ubuntu.sources
sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config build-essential
- # The web package's browser project runs React tests in headless Chromium.
+ - name: Test
+ run: vp run --parallel --concurrency-limit 4 --filter '!t3' --filter '!@t3tools/monorepo' --filter '!@t3tools/web' test
+
+ # Web browser tests time out when they share a runner with the other package
+ # suites: Chromium gets too little CPU and diff workers miss their 10s start budget.
+ test_web:
+ name: Release web tests
+ needs: [preflight]
+ if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' }}
+ runs-on: blacksmith-8vcpu-ubuntu-2404
+ timeout-minutes: 10
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+ with:
+ ref: ${{ needs.preflight.outputs.ref }}
+ sparse-checkout: |
+ /*
+ !/.repos/
+ sparse-checkout-cone-mode: false
+
+ - name: Setup dependencies
+ uses: ./.github/actions/setup-ci-deps
+
+ - name: Resolve Playwright version
+ id: playwright_version
+ run: echo "version=$(node -p "require('./apps/web/node_modules/playwright/package.json').version")" >> "$GITHUB_OUTPUT"
+
+ - name: Cache Chromium
+ id: chromium_cache
+ uses: actions/cache@v6
+ with:
+ path: ~/.cache/ms-playwright
+ key: playwright-chromium-shell-${{ runner.os }}-${{ runner.arch }}-${{ steps.playwright_version.outputs.version }}
+
- name: Install Chromium for web browser tests
- run: node apps/web/node_modules/playwright/cli.js install --with-deps --only-shell chromium
+ if: steps.chromium_cache.outputs.cache-hit != 'true'
+ run: node apps/web/node_modules/playwright/cli.js install --only-shell chromium
+
+ - name: Install missing Chromium system dependencies
+ run: |
+ browser=$(find "$HOME/.cache/ms-playwright" -name chrome-headless-shell -type f -print -quit)
+ test -n "$browser"
+ if ldd "$browser" | grep '=> not found'; then
+ node apps/web/node_modules/playwright/cli.js install-deps chromium
+ fi
- name: Test
- run: vp run --parallel --concurrency-limit 4 --filter '!t3' --filter '!@t3tools/monorepo' test
+ run: vp run --filter @t3tools/web test
+ # Server test files run one at a time, so more small runners beat fewer big ones.
test_server:
name: Release server tests ${{ matrix.shard }}
needs: [preflight]
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' }}
- runs-on: blacksmith-8vcpu-ubuntu-2404
+ runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
- shard: [1, 2, 3]
+ shard: [1, 2, 3, 4, 5, 6, 7, 8]
steps:
- name: Checkout
uses: actions/checkout@v6
@@ -693,6 +737,7 @@ jobs:
relay_public_config,
quality,
test,
+ test_web,
test_server,
desktop_mac_arm64,
desktop_mac_x64,
@@ -701,7 +746,7 @@ jobs:
desktop_win_x64,
desktop_win_arm64,
]
- if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.relay_public_config.result == 'success' && needs.quality.result == 'success' && needs.test.result == 'success' && needs.test_server.result == 'success' && needs.desktop_mac_arm64.result == 'success' && needs.desktop_mac_x64.result == 'success' && needs.desktop_linux_x64.result == 'success' && needs.desktop_linux_arm64.result == 'success' && needs.desktop_win_x64.result == 'success' && needs.desktop_win_arm64.result == 'success' }}
+ if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.relay_public_config.result == 'success' && needs.quality.result == 'success' && needs.test.result == 'success' && needs.test_web.result == 'success' && needs.test_server.result == 'success' && needs.desktop_mac_arm64.result == 'success' && needs.desktop_mac_x64.result == 'success' && needs.desktop_linux_x64.result == 'success' && needs.desktop_linux_arm64.result == 'success' && needs.desktop_win_x64.result == 'success' && needs.desktop_win_arm64.result == 'success' }}
runs-on: blacksmith-8vcpu-ubuntu-2404
timeout-minutes: 30
permissions: