From 8dacb9ddba6a898406eb8c4e9bd01ec7ef36015d Mon Sep 17 00:00:00 2001 From: chan Date: Fri, 3 Apr 2026 10:08:14 +0900 Subject: [PATCH] perf(ci): use vite build and preview in playwright to speed up E2E tests --- adminfront/playwright.config.ts | 2 +- devfront/playwright.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/adminfront/playwright.config.ts b/adminfront/playwright.config.ts index 2acbace2..0e21a206 100644 --- a/adminfront/playwright.config.ts +++ b/adminfront/playwright.config.ts @@ -61,7 +61,7 @@ export default defineConfig({ /* Run your local dev server before starting the tests */ webServer: { - command: "npm run dev", + command: process.env.CI ? "npm run build && npm run preview -- --port 5173" : "npm run dev", url: "http://localhost:5173", reuseExistingServer: !process.env.CI, timeout: 120 * 1000, diff --git a/devfront/playwright.config.ts b/devfront/playwright.config.ts index b52394df..53716cfa 100644 --- a/devfront/playwright.config.ts +++ b/devfront/playwright.config.ts @@ -56,7 +56,7 @@ export default defineConfig({ /* Run your local dev server before starting the tests */ webServer: { - command: "npm run dev -- --port 5174", + command: process.env.CI ? "npm run build && npm run preview -- --port 5174" : "npm run dev -- --port 5174", url: "http://localhost:5174", reuseExistingServer: !process.env.CI, },