diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a9cf1a62f..d71786cba8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -330,12 +330,19 @@ 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. + # Each shard runs on its own runner. With one worker, a single browser page ran + # every browser file in a shard and lost its connection partway through on a + # cold Vite cache; two workers split the files over two pages. test_web: - name: Test Web + name: Test Web ${{ matrix.shard }} needs: changes if: ${{ !cancelled() && needs.changes.outputs.test_web != 'false' }} runs-on: ubuntu-24.04 timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + shard: [1, 2, 3, 4] steps: - name: Checkout uses: actions/checkout@v6 @@ -375,11 +382,7 @@ jobs: fi - name: Test - # fresh processes avoid the connection loss in the full single-worker browser suite. - run: | - for shard in 1 2 3 4; do - vp run --filter @t3tools/web test --maxWorkers 1 --shard "$shard/4" - done + run: vp run --filter @t3tools/web test --maxWorkers 2 --shard ${{ matrix.shard }}/${{ strategy.job-total }} # apps/server sets `fileParallelism: false`, so its test files run strictly # one at a time. Sharding spreads them over separate runners instead of