Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: speed up server for playwright tests on CI #3274

Merged
merged 4 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
branches: [main, beta]
pull_request:
branches: [main, beta]
env:
NEXT_PUBLIC_BASE_URL: http://localhost:3000
nickytonline marked this conversation as resolved.
Show resolved Hide resolved
jobs:
test:
timeout-minutes: 60
Expand All @@ -15,6 +17,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
Original file line number Diff line number Diff line change
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",
nickytonline marked this conversation as resolved.
Show resolved Hide resolved
url: "http://127.0.0.1:3000",
reuseExistingServer: !process.env.CI,
},
Expand Down
Loading