Skip to content

Commit d9cd57d

Browse files
committed
perf(ci): split webapp e2e tests across runners
1 parent f62351a commit d9cd57d

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/e2e-webapp.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@ jobs:
1616
name: "🧪 E2E Tests: Webapp"
1717
runs-on: warp-ubuntu-latest-x64-16x
1818
timeout-minutes: 30
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
shardIndex: [1, 2]
23+
shardTotal: [2]
1924
env:
2025
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
26+
SHARD_INDEX: ${{ matrix.shardIndex }}
27+
SHARD_TOTAL: ${{ matrix.shardTotal }}
2128
steps:
2229
- name: 🔧 Disable IPv6
2330
run: |
@@ -130,6 +137,6 @@ jobs:
130137
run: cd apps/webapp && pnpm exec playwright install chromium
131138

132139
- name: 🧪 Run Webapp E2E Tests
133-
run: cd apps/webapp && pnpm exec vitest run --config vitest.e2e.config.ts --reporter=default
140+
run: cd apps/webapp && pnpm exec vitest run --config vitest.e2e.config.ts --reporter=default --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
134141
env:
135142
WEBAPP_TEST_VERBOSE: "1"

apps/webapp/vitest.e2e.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { defineConfig } from "vitest/config";
2+
import { DurationShardingSequencer } from "@internal/testcontainers/sequencer";
23
import tsconfigPaths from "vite-tsconfig-paths";
34

45
export default defineConfig({
56
test: {
7+
sequence: { sequencer: DurationShardingSequencer },
68
include: ["test/**/*.e2e.test.ts"],
79
globals: true,
810
pool: "forks",

test-timings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
"apps/webapp/test/activitySeries.server.test.ts": 6,
109109
"apps/webapp/test/additionalApiKeyIssuance.test.ts": 3,
110110
"apps/webapp/test/aiTitleRateLimiter.test.ts": 55,
111+
"apps/webapp/test/api-auth.e2e.test.ts": 20090,
111112
"apps/webapp/test/api.v1.waitpoints.tokens.complete.crossSeamGuard.test.ts": 94856,
112113
"apps/webapp/test/api.v1.waitpoints.tokens.test.ts": 174422,
113114
"apps/webapp/test/apiAuthActorClaim.test.ts": 4,
@@ -279,6 +280,7 @@
279280
"apps/webapp/test/getDeploymentImageRef.test.ts": 6,
280281
"apps/webapp/test/getTraceDetailedSubtreeSummary.integration.test.ts": 466,
281282
"apps/webapp/test/googleEmailVerification.test.ts": 2,
283+
"apps/webapp/test/healthcheck-require-plugins.e2e.test.ts": 37215,
282284
"apps/webapp/test/httpErrors.test.ts": 2,
283285
"apps/webapp/test/idempotencyDedupResidency.test.ts": 7600,
284286
"apps/webapp/test/idempotencyExpiredRecreateReserialize.test.ts": 2,
@@ -459,7 +461,12 @@
459461
"apps/webapp/test/services.controlPlane.readthrough.test.ts": 7217,
460462
"apps/webapp/test/services/organizationAccessToken.test.ts": 6,
461463
"apps/webapp/test/services/personalAccessToken.test.ts": 7,
464+
"apps/webapp/test/session-agent.e2e.test.ts": 73920,
465+
"apps/webapp/test/session-stream.browser.e2e.test.ts": 20470,
466+
"apps/webapp/test/session-stream.e2e.test.ts": 30404,
462467
"apps/webapp/test/sessionDuration.test.ts": 10855,
468+
"apps/webapp/test/sessionRunStreamsBackend.e2e.test.ts": 20771,
469+
"apps/webapp/test/sessionRunStreamsPerOrgBasin.e2e.test.ts": 20639,
463470
"apps/webapp/test/sessionWaitpointRoutes.replicaLag.guard.test.ts": 13790,
464471
"apps/webapp/test/sessions.readthrough.test.ts": 9480,
465472
"apps/webapp/test/sessionsReplicationService.test.ts": 19666,

0 commit comments

Comments
 (0)