From 49c7f2b49d70ce890d7b15f54dfbf1daccb3e4db Mon Sep 17 00:00:00 2001 From: jeremieflrnt <55829284+jeremieflrnt@users.noreply.github.com> Date: Sat, 2 Dec 2023 15:08:21 +0100 Subject: [PATCH] adding github playwright yml --- .github/workflows/playwright.yml | 35 ++++++++++++++++++++++++++++++++ playwright/playwright.config.ts | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) 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..6643399 --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,35 @@ +name: Playwright Tests +on: + push: + branches: [main, master, feat/github-actions-playwright] + pull_request: + branches: [main, master] +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + container: + image: mcr.microsoft.com/playwright:v1.39.0-jammy + defaults: + run: + working-directory: ./playwright + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install dependencies + run: npm ci + - name: Install Playwright + run: PLAYWRIGHT_BROWSERS_PATH=0 npx playwright install --with-deps + - name: Run your tests + run: npx playwright test + env: + HOME: /root + ENVIRONMENT: production + - uses: actions/upload-artifact@v3 + if: always() + with: + name: out-report + path: out/report/ + retention-days: 30 diff --git a/playwright/playwright.config.ts b/playwright/playwright.config.ts index 1d4221e..b9aff59 100644 --- a/playwright/playwright.config.ts +++ b/playwright/playwright.config.ts @@ -3,7 +3,7 @@ import fs from 'fs'; import { PW_AUTH_FILE } from './tests/auth.setup'; const getBaseUrl = (): string => { - return process.env.ENVIRONMENT === 'production' ? 'https://beleffort.vercel.app' : 'http://localhost:3000'; + return process.env.ENVIRONMENT === 'production' ? 'https://beleffort.app' : 'http://localhost:3000'; }; const getReportersList = (): ReporterDescription[] => {