diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 31562df16b..42b87a3e59 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -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 @@ -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 diff --git a/playwright.config.ts b/playwright.config.ts index 13879e9e6b..181dae1841 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -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, },