Skip to content

Commit 81a7181

Browse files
committed
ci: configure Playwright to use preview server in CI and build step in workflow
1 parent e4229b8 commit 81a7181

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/playwright.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
node-version: lts/*
1616
- name: Install dependencies
1717
run: npm ci
18+
- name: Build app
19+
run: npm run build
1820
- name: Install Playwright Browsers
1921
run: npx playwright install --with-deps
2022
- name: Run unit and E2E tests

playwright.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ export default defineConfig({
6060
],
6161

6262
webServer: {
63-
command: 'npm run dev',
63+
command: process.env.CI
64+
? 'npm run preview -- --port=5173'
65+
: 'npm run dev',
6466
url: 'http://localhost:5173',
6567
timeout: 120 * 1000,
6668
reuseExistingServer: !process.env.CI,

0 commit comments

Comments
 (0)