From f7df4c5d6265d2f6c39989d93a85eabb82580939 Mon Sep 17 00:00:00 2001 From: MrAlders0n Date: Thu, 24 Sep 2026 15:55:37 -0400 Subject: [PATCH] Run browser tests in parallel shards with 4 workers --- .github/workflows/quality.yml | 35 ++++++++++++++++++++++++++++++++--- playwright.config.mjs | 2 +- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 74648244..48be1e6d 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -88,10 +88,27 @@ jobs: - name: Check patch hygiene run: git diff --check - browser: + browser-shard: + name: browser (${{ matrix.project }}) needs: validate runs-on: ubuntu-latest timeout-minutes: 35 + strategy: + fail-fast: false + matrix: + include: + - project: chromium + engine: chromium + - project: chromium-dark + engine: chromium + - project: mobile-chromium + engine: chromium + - project: firefox + engine: firefox + - project: webkit + engine: webkit + - project: mobile-webkit + engine: webkit steps: - name: Checkout repository @@ -114,13 +131,25 @@ jobs: run: | python -m pip install -r requirements-docs.txt npm ci - npx playwright install --with-deps chromium firefox webkit + npx playwright install --with-deps ${{ matrix.engine }} - name: Build site run: npm run docs:build - name: Run critical journeys and accessibility checks - run: npm run test:browser + run: npm run test:browser -- --project=${{ matrix.project }} + + # Branch protection requires a check named "browser"; this job passes only + # when every browser shard above passed. + browser: + needs: browser-shard + if: always() + runs-on: ubuntu-latest + timeout-minutes: 5 + + steps: + - name: Require every browser shard to pass + run: test "${{ needs.browser-shard.result }}" = "success" lighthouse: needs: validate diff --git a/playwright.config.mjs b/playwright.config.mjs index bb37b449..4902f115 100644 --- a/playwright.config.mjs +++ b/playwright.config.mjs @@ -9,7 +9,7 @@ export default defineConfig({ fullyParallel: true, forbidOnly: Boolean(process.env.CI), retries: process.env.CI ? 2 : 0, - workers: 2, + workers: process.env.CI ? 4 : 2, timeout: 30_000, expect: { timeout: 8_000