From 3648cf3c0f1ff620f61b7298525fcb82126686f9 Mon Sep 17 00:00:00 2001 From: Brendan Ryan Date: Wed, 8 Apr 2026 08:07:42 -0700 Subject: [PATCH 1/4] ci: speed up verify workflow --- .github/workflows/verify.yml | 45 ++++++++++++------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 3b53e360..b60282c1 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -5,6 +5,10 @@ on: pull_request: workflow_dispatch: +concurrency: + group: verify-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: check: name: Check @@ -19,6 +23,10 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v6 + with: + node-version: 24.12.0 + cache: pnpm + cache-dependency-path: pnpm-lock.yaml - name: Setup pnpm run: corepack enable pnpm @@ -53,6 +61,9 @@ jobs: e2e: name: E2E Tests (${{ matrix.shard }}/${{ strategy.job-total }}) runs-on: ubuntu-latest + container: + image: mcr.microsoft.com/playwright:v1.58.0-noble + options: --user 1001 timeout-minutes: 15 permissions: contents: read @@ -67,43 +78,17 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v6 + with: + node-version: 24.12.0 + cache: pnpm + cache-dependency-path: pnpm-lock.yaml - name: Setup pnpm run: corepack enable pnpm - - name: Get pnpm store directory - id: pnpm-cache - run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT - - - name: Cache pnpm dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.pnpm-cache.outputs.dir }} - key: pnpm-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} - restore-keys: pnpm-${{ runner.os }}- - - name: Install dependencies run: pnpm install - - name: Get Playwright version - id: playwright-version - run: echo "version=$(pnpm exec playwright --version | cut -d' ' -f2)" >> $GITHUB_OUTPUT - - - name: Cache Playwright browsers - id: playwright-cache - uses: actions/cache@v4 - with: - path: ~/.cache/ms-playwright - key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} - - - name: Install Playwright browsers - if: steps.playwright-cache.outputs.cache-hit != 'true' - run: pnpm exec playwright install chromium --with-deps - - - name: Install Playwright system deps - if: steps.playwright-cache.outputs.cache-hit == 'true' - run: pnpm exec playwright install-deps chromium - - name: Run Playwright tests run: pnpm run test:e2e --shard=${{ matrix.shard }}/3 From 981ef219f799e799fc8886f635b5be4746e38832 Mon Sep 17 00:00:00 2001 From: Brendan Ryan Date: Wed, 8 Apr 2026 08:14:13 -0700 Subject: [PATCH 2/4] fix: install pnpm before setup-node cache --- .github/workflows/verify.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index b60282c1..05646db0 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -21,6 +21,12 @@ jobs: - name: Clone repository uses: actions/checkout@v6 + - name: Setup pnpm + uses: pnpm/action-setup@v5 + with: + run_install: false + version: 10.28.1 + - name: Setup Node.js uses: actions/setup-node@v6 with: @@ -28,9 +34,6 @@ jobs: cache: pnpm cache-dependency-path: pnpm-lock.yaml - - name: Setup pnpm - run: corepack enable pnpm - - name: Install dependencies run: pnpm install @@ -76,6 +79,12 @@ jobs: - name: Clone repository uses: actions/checkout@v6 + - name: Setup pnpm + uses: pnpm/action-setup@v5 + with: + run_install: false + version: 10.28.1 + - name: Setup Node.js uses: actions/setup-node@v6 with: @@ -83,9 +92,6 @@ jobs: cache: pnpm cache-dependency-path: pnpm-lock.yaml - - name: Setup pnpm - run: corepack enable pnpm - - name: Install dependencies run: pnpm install From 09c106cd5582e5e46f8bb8e84e3772f97706a6fc Mon Sep 17 00:00:00 2001 From: Brendan Ryan Date: Wed, 8 Apr 2026 08:23:34 -0700 Subject: [PATCH 3/4] fix: use http for CI e2e server --- playwright.config.ts | 17 ++++++++++------- vite.config.ts | 10 +++++++++- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/playwright.config.ts b/playwright.config.ts index b9437203..ea4676c7 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,15 +1,18 @@ import { defineConfig, devices } from '@playwright/test' +const isCI = !!process.env.CI +const webServerUrl = isCI ? 'http://127.0.0.1:5173' : 'https://localhost:5173' + export default defineConfig({ testDir: './e2e', fullyParallel: true, - forbidOnly: !!process.env.CI, - retries: process.env.CI ? 1 : 1, // Retry once due to testnet flakiness - workers: process.env.CI ? 4 : undefined, + forbidOnly: isCI, + retries: isCI ? 1 : 1, // Retry once due to testnet flakiness + workers: isCI ? 4 : undefined, timeout: 180000, // 3 min default timeout for testnet transactions reporter: 'html', use: { - baseURL: 'https://localhost:5173', + baseURL: webServerUrl, ignoreHTTPSErrors: true, trace: 'on-first-retry', }, @@ -20,10 +23,10 @@ export default defineConfig({ }, ], webServer: { - command: process.env.CI ? 'VITE_E2E=true pnpm run dev 2>/dev/null' : 'pnpm run dev 2>/dev/null', - url: 'https://localhost:5173', + command: isCI ? 'VITE_E2E=true VITE_USE_HTTP=true pnpm run dev' : 'pnpm run dev 2>/dev/null', + url: webServerUrl, ignoreHTTPSErrors: true, - reuseExistingServer: !process.env.CI, + reuseExistingServer: !isCI, stdout: 'ignore', stderr: 'ignore', }, diff --git a/vite.config.ts b/vite.config.ts index ddbda55a..14c1b605 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -12,8 +12,16 @@ export default defineConfig(({ mode }) => { for (const key of Object.keys(env)) { if (!(key in process.env)) process.env[key] = env[key] } + + const useHttp = process.env.CI === 'true' || process.env.VITE_USE_HTTP === 'true' + return { - plugins: [syncTips(), vocs(), react(), mkcert(), tempoNode()], + plugins: [syncTips(), vocs(), react(), ...(useHttp ? [] : [mkcert()]), tempoNode()], + server: useHttp + ? { + host: '127.0.0.1', + } + : undefined, } }) From 7a360b9ec46151b577e7bb93a6489efc8e8cc287 Mon Sep 17 00:00:00 2001 From: Brendan Ryan Date: Wed, 8 Apr 2026 08:38:35 -0700 Subject: [PATCH 4/4] fix: use localhost for CI e2e auth --- playwright.config.ts | 2 +- vite.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/playwright.config.ts b/playwright.config.ts index ea4676c7..4ef1c164 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,7 +1,7 @@ import { defineConfig, devices } from '@playwright/test' const isCI = !!process.env.CI -const webServerUrl = isCI ? 'http://127.0.0.1:5173' : 'https://localhost:5173' +const webServerUrl = isCI ? 'http://localhost:5173' : 'https://localhost:5173' export default defineConfig({ testDir: './e2e', diff --git a/vite.config.ts b/vite.config.ts index 14c1b605..08ed63aa 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -19,7 +19,7 @@ export default defineConfig(({ mode }) => { plugins: [syncTips(), vocs(), react(), ...(useHttp ? [] : [mkcert()]), tempoNode()], server: useHttp ? { - host: '127.0.0.1', + host: 'localhost', } : undefined, }