Skip to content

Commit 13da79c

Browse files
authored
Merge pull request #90 from sidclawhq/fix/browser-ci-production-servers
fix(browser-tests): production Next builds in CI, dev servers locally
2 parents de0646c + cf853fd commit 13da79c

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

playwright.config.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ export default defineConfig({
1515
trace: 'on-first-retry',
1616
viewport: { width: 1440, height: 900 },
1717
},
18+
// In CI the Next.js apps run PRODUCTION builds: dev servers compile each
19+
// page on first hit, and on a 2-core runner those compiles blow the 30s
20+
// selector timeouts (validation run 30460483491: 35 timeout failures that
21+
// never reproduce locally). The API keeps its dev server everywhere — tsx
22+
// has no per-page compile step.
1823
webServer: [
1924
{
2025
command: 'cd apps/api && npm run dev',
@@ -23,19 +28,21 @@ export default defineConfig({
2328
timeout: 30000,
2429
},
2530
{
26-
command: 'cd apps/dashboard && npm run dev',
31+
command: process.env.CI
32+
? 'cd apps/dashboard && npm run build && npm run start'
33+
: 'cd apps/dashboard && npm run dev',
2734
port: 3000,
2835
reuseExistingServer: true,
29-
timeout: 30000,
36+
timeout: process.env.CI ? 420000 : 30000,
3037
},
3138
{
3239
// The landing-page specs (01-*) target the landing app directly.
33-
// Locally an absent server made them skip; in CI they hard-failed
34-
// with ERR_CONNECTION_REFUSED on the suite's first scheduled run.
35-
command: 'cd apps/landing && npm run dev',
40+
command: process.env.CI
41+
? 'cd apps/landing && npm run build && npm run start'
42+
: 'cd apps/landing && npm run dev',
3643
port: 3002,
3744
reuseExistingServer: true,
38-
timeout: 60000,
45+
timeout: process.env.CI ? 420000 : 60000,
3946
},
4047
],
4148
projects: [

0 commit comments

Comments
 (0)