From 8c1da4fced0a0710837fed1f6fa882f92a5f1e0e Mon Sep 17 00:00:00 2001 From: maybeast <78227110+maybeast@users.noreply.github.com> Date: Thu, 1 Aug 2024 14:55:16 +0300 Subject: [PATCH] rework webserver start --- .github/workflows/playwright.yml | 7 +++---- playwright.config.ts | 12 +++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 341a0b23..de5760ac 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -21,10 +21,9 @@ jobs: - name: Install Playwright Browsers run: npx playwright install --with-deps - name: Run Playwright tests - run: | - npm run start & - sleep 10 - npx playwright test + env: + CI: true + run: npx playwright test - uses: actions/upload-artifact@v4 if: always() with: diff --git a/playwright.config.ts b/playwright.config.ts index 1911b0c4..84e962dc 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -75,9 +75,11 @@ export default defineConfig({ ], /* Run your local dev server before starting the tests */ - // webServer: { - // command: 'npm run start', - // url: 'http://127.0.0.1:3000', - // reuseExistingServer: !process.env.CI, - // }, + webServer: { + command: 'npm run start', + port: 5173, + reuseExistingServer: !process.env.CI, + stdout: 'pipe', + stderr: 'pipe', + }, });