From f148370e1faf04d3a344fe61cec26a0a2eae7b12 Mon Sep 17 00:00:00 2001 From: Yonas Beshawred Date: Thu, 2 Jul 2026 00:19:10 -0700 Subject: [PATCH] [ci] Shard the Windows Playwright dev suite to cut the long pole The `playwright-windows` job sharded the whole CLI e2e suite across two shards, but the dev-server suites in `e2e/playwright/dev` dominate Windows runtime. Because Playwright keeps `describe.serial` blocks on a single shard, count-based sharding of the mixed suite left one shard at ~20m while the other finished in ~5m. Split the slow `dev` directory across three `--shard` jobs and run the faster `prod` suite on its own, reusing the same `--shard` mechanism as the Ubuntu Playwright job. This drops the Windows Playwright test-step long pole from ~20m to ~8m with the same total test coverage. Sharding by directory keeps newly added test files covered automatically. --- .github/workflows/cli.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 8733ad1e562f3b..dacc727c41317f 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -239,7 +239,24 @@ jobs: strategy: fail-fast: false matrix: - shard: [1, 2] + # The dev-server Playwright suites dominate Windows runtime, so the slow + # `dev` directory is split across shards while the faster `prod` suite + # runs on its own. Sharding by directory (rather than a hand-maintained + # file list) keeps new test files covered automatically and reuses the + # same `--shard` mechanism as the Ubuntu Playwright job above. + include: + - name: dev-1 + test-paths: e2e/playwright/dev + shard: 1/3 + - name: dev-2 + test-paths: e2e/playwright/dev + shard: 2/3 + - name: dev-3 + test-paths: e2e/playwright/dev + shard: 3/3 + - name: prod + test-paths: e2e/playwright/prod + shard: 1/1 env: # Change bun, npm, and pnpm caches to the much faster D:\ drive # See: https://github.com/twpayne/chezmoi/pull/4064 @@ -308,12 +325,12 @@ jobs: - name: ๐Ÿงช E2E (playwright) Test CLI working-directory: packages/@expo/cli - run: pnpm test:playwright --shard ${{ matrix.shard }}/${{ strategy.job-total }} + run: pnpm test:playwright ${{ matrix.test-paths }} --shard ${{ matrix.shard }} - name: ๐Ÿ—„๏ธ Upload playwright report uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 if: always() with: - name: playwright-report-windows-${{ matrix.shard }} + name: playwright-report-windows-${{ matrix.name }} path: packages/@expo/cli/playwright-report/ retention-days: 30