Skip to content

Commit 5d8b8cc

Browse files
eakmanrqclaude
andcommitted
Fix ui-test: pre-build UI to avoid Playwright webServer timeout
The Playwright webServer command (npm run build && npm run preview) was timing out in CI because the full TypeScript + Vite build exceeds the 120s timeout inside the container. Pre-build the UI in a separate step and set PLAYWRIGHT_SKIP_BUILD so Playwright only starts the preview server. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: eakmanrq <6326532+eakmanrq@users.noreply.github.com>
1 parent 435dbed commit 5d8b8cc

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/pr.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,12 @@ jobs:
231231
pnpm config set store-dir .pnpm-store
232232
- name: Install dependencies
233233
run: pnpm install
234+
- name: Build UI
235+
run: npm --prefix web/client run build
234236
- name: Run tests
235237
run: npm --prefix web/client run test
238+
env:
239+
PLAYWRIGHT_SKIP_BUILD: '1'
236240

237241
engine-tests-docker:
238242
needs: changes

web/client/playwright.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ export default defineConfig({
5050

5151
/* Run your local dev server before starting the tests */
5252
webServer: {
53-
command: 'npm run build && npm run preview',
53+
command:
54+
process.env.PLAYWRIGHT_SKIP_BUILD != null
55+
? 'npm run preview'
56+
: 'npm run build && npm run preview',
5457
url: URL,
5558
reuseExistingServer: process.env.CI == null,
5659
timeout: 120000, // Two minutes

0 commit comments

Comments
 (0)