diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 417f0a95e8552..db3f0ea540a9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -322,16 +322,25 @@ 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. + # It is also the longest job of web pull requests, so vitest's `--shard` splits + # its test files (unit and browser alike, by a hash of the path) over two + # runners. The shards repeat only checkout, install and the Chromium restore, + # about 20s. The `Check` job needs `test_web` as a whole, so this adds no + # required status. release.yml mirrors the test, test_web, and test_server + # split but not the web shards: it is not a pull request wait. test_web: permissions: contents: read id-token: write - name: Test Web + name: Test Web ${{ matrix.shard }} needs: changes if: ${{ !cancelled() && needs.changes.outputs.test_web != 'false' }} runs-on: blacksmith-8vcpu-ubuntu-2404 timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + shard: [1, 2] steps: - name: Checkout uses: actions/checkout@v6 @@ -373,7 +382,7 @@ jobs: fi - name: Test - run: vp run --filter @t3tools/web test + run: vp run --filter @t3tools/web test --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