From d3f873c120e620d5b2b78cdd9f891975cafa8e2e Mon Sep 17 00:00:00 2001 From: Anthelixes Date: Thu, 5 Mar 2026 10:49:38 +0200 Subject: [PATCH] Add workflow for Playwright tests --- .github/workflows/playwright.yml | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) 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..6186b8f --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,40 @@ +name: Playwright Tests +#on: +# pull_request: +# branches: +# - main +jobs: + playwright: + timeout-minutes: 90 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20' + - name: Install dependencies + run: npm ci + working-directory: ./playwright + - name: Install Playwright browsers + run: npx playwright install --with-deps + working-directory: ./playwright + - name: Create baseline screenshots + run: npx playwright test --project=production --update-snapshots + working-directory: ./playwright + env: + PROD_URL: ${{ vars.PROD_URL }} + - name: Run Playwright tests + continue-on-error: true + run: npx playwright test --project=test + working-directory: ./playwright + env: + TEST_URL: ${{ vars.TEST_URL }} + TEST_USERNAME: ${{ secrets.TEST_USERNAME }} + TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }} + - name: Upload HTML report + if: always() + uses: actions/upload-artifact@v4 + with: + name: playwright-report + path: playwright/playwright-report/ + retention-days: 30