diff --git a/.github/scripts/otter-adapt-upstream.sh b/.github/scripts/otter-adapt-upstream.sh index 0106ee7b2557..7e2ac635cc48 100755 --- a/.github/scripts/otter-adapt-upstream.sh +++ b/.github/scripts/otter-adapt-upstream.sh @@ -25,6 +25,12 @@ perl -pi -e 's/^( timeout-minutes: )10$/${1}20/' .github/workflows/release.ym # web test job needs more time than upstream's 8-vCPU runners do. perl -0pi -e 's/(\n test_web:\n(?: .*\n)*? timeout-minutes: )10\n/${1}20\n/' .github/workflows/ci.yml +# A single browser session over every web browser test runs Chromium out of memory on +# the 16 GB GitHub-hosted runners, closing the page at a different file each run. Separate +# processes and two browser shards give each a fresh Chromium. +perl -pi -e 's|^(\s+)run: vp run --filter \@t3tools/web test$|$1run: \|\n$1 cd apps/web\n$1 vp test run --passWithNoTests --project unit\n$1 vp test run --passWithNoTests --project browser --shard 1/2\n$1 vp test run --passWithNoTests --project browser --shard 2/2|' \ + .github/workflows/ci.yml .github/workflows/release.yml + # The production relay deploy must run for this repository after an upstream sync. python3 - <<'PY_RELAY' from pathlib import Path diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9c7e141b045..c734248a7c30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -406,7 +406,11 @@ jobs: fi - name: Test - run: vp run --filter @t3tools/web test + run: | + cd apps/web + vp test run --passWithNoTests --project unit + vp test run --passWithNoTests --project browser --shard 1/2 + vp test run --passWithNoTests --project browser --shard 2/2 # apps/server sets `fileParallelism: false`, so its test files run strictly # one at a time. Sharding spreads them over separate runners instead of diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index be78992df7a3..bfdede3dc7ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -344,7 +344,11 @@ jobs: fi - name: Test - run: vp run --filter @t3tools/web test + run: | + cd apps/web + vp test run --passWithNoTests --project unit + vp test run --passWithNoTests --project browser --shard 1/2 + vp test run --passWithNoTests --project browser --shard 2/2 # Browser tests run source modules; this boots the production chunk graph. - name: Boot the built web client