From 741027f46dd086fd5bde4001efbb8dd2588cf428 Mon Sep 17 00:00:00 2001 From: KCM Date: Sun, 29 Mar 2026 09:12:02 -0500 Subject: [PATCH 1/2] ci: shard over browser, cache. --- .github/workflows/playwright.yml | 24 ++++++++++++++++++------ playwright.config.ts | 1 + 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 173a7ec..ecedf26 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -14,9 +14,15 @@ on: jobs: e2e: - name: E2E (Playwright) + name: E2E (Playwright, ${{ matrix.browser }}) runs-on: ubuntu-latest - timeout-minutes: 25 + timeout-minutes: 35 + strategy: + fail-fast: false + matrix: + browser: + - chromium + - webkit steps: - name: Checkout @@ -26,6 +32,7 @@ jobs: uses: actions/setup-node@v6.2.0 with: node-version: '24.14.0' + cache: npm - name: Install Dependencies run: npm ci @@ -33,16 +40,21 @@ jobs: - name: Check Types run: npm run check-types - - name: Lint Playwright Files - run: npm run lint:playwright + - name: Cache Playwright Browsers + uses: actions/cache@v5 + with: + path: ~/.cache/ms-playwright + key: ${{ runner.os }}-playwright-${{ matrix.browser }}-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.os }}-playwright-${{ matrix.browser }}- - name: Install Browsers - run: npx playwright install --with-deps chromium webkit + run: npx playwright install --with-deps ${{ matrix.browser }} - name: Run Playwright Tests env: CI: 'true' - run: npm run test:e2e + run: npm run test:e2e -- --project=${{ matrix.browser }} - name: Upload Playwright report uses: actions/upload-artifact@v6.0.0 diff --git a/playwright.config.ts b/playwright.config.ts index d9eaade..207db14 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -31,6 +31,7 @@ export default defineConfig({ testDir: 'playwright', timeout: isCI ? 120_000 : 20_000, retries: isCI ? 1 : 0, + workers: isCI ? 2 : undefined, expect: { timeout: isCI ? 90_000 : 15_000, }, From 10b61c0647ae96a8db4a291853bcf1d5074809a7 Mon Sep 17 00:00:00 2001 From: KCM Date: Sun, 29 Mar 2026 09:16:51 -0500 Subject: [PATCH 2/2] ci: artifact naming. --- .github/workflows/playwright.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index ecedf26..00a20b2 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -60,7 +60,7 @@ jobs: uses: actions/upload-artifact@v6.0.0 if: ${{ failure() }} with: - name: playwright-report + name: playwright-report-${{ matrix.browser }} path: playwright-report if-no-files-found: ignore @@ -68,6 +68,6 @@ jobs: uses: actions/upload-artifact@v6.0.0 if: ${{ failure() }} with: - name: test-results + name: test-results-${{ matrix.browser }} path: test-results if-no-files-found: ignore