Skip to content

Commit

Permalink
test: speed up server for playwright tests on CI (#3274)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickytonline committed Apr 29, 2024
1 parent 664197f commit dd62ef4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/playwright.yml
Expand Up @@ -4,6 +4,8 @@ on:
branches: [main, beta]
pull_request:
branches: [main, beta]
env:
NEXT_PUBLIC_BASE_URL: http://localhost:3000
jobs:
test:
name: E2E Tests
Expand All @@ -16,6 +18,8 @@ jobs:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Build App
run: npm run build
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Expand Up @@ -70,7 +70,7 @@ export default defineConfig({

/* Run your local dev server before starting the tests */
webServer: {
command: "npm run dev",
command: process.env.CI ? "npm start" : "npm run dev",
url: "http://127.0.0.1:3000",
reuseExistingServer: !process.env.CI,
},
Expand Down

0 comments on commit dd62ef4

Please sign in to comment.