From fd7c2e3198f2309bc60f8163fe8f5eed0b38577e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramiro=20G=C3=B3mez?= Date: Mon, 7 Oct 2024 00:27:11 +0200 Subject: [PATCH] Add modified playwright config. Use url to examples dir in webserver config. --- .github/workflows/playwright.yml | 27 +++++++++++++++++++++++++++ playwright.config.js | 10 +++++----- 2 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/playwright.yml diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml new file mode 100644 index 0000000..d3e374f --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,27 @@ +name: Playwright Tests +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Install dependencies + run: npm i + - name: Install Playwright browsers + run: npx playwright install --with-deps + - name: Run tests + run: npm run test + - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/playwright.config.js b/playwright.config.js index e01c675..9eecc00 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -50,10 +50,10 @@ export default defineConfig({ ], /* Run your local dev server before starting the tests */ - // webServer: { - // command: 'npm run serve', - // url: 'http://127.0.0.1:8000', - // reuseExistingServer: !process.env.CI, - // }, + webServer: { + command: 'npm run serve', + url: 'http://127.0.0.1:8000/examples/', + reuseExistingServer: !process.env.CI, + }, });