From 39efa09e4b7476fef86d8bb1cbef82591c41f1ee Mon Sep 17 00:00:00 2001 From: Alyssa Weber Date: Sat, 27 Jun 2026 17:10:57 +0200 Subject: [PATCH] Add Playwright CI workflow for testing Workflow runs two pre-configured Playwright tests with a pre-made Recapp quiz. One playwright test contains a 5-second delay when answering each question, while the other test does not. A more optimized workflow is planned. --- .github/workflows/playwright.yml | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 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..82edf9f --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,49 @@ +name: Run Playwright Tests + +on: + push: + branches: + - feature/implementing-playwright # Runs when pushing to playright branch for now + +jobs: + test: + name: Run Playwright Tests on Feature Branch + runs-on: ubuntu-latest + + steps: + - name: Checkout feature/implementing-playwright branch + uses: actions/checkout@v4 + with: + ref: feature/implementing-playwright + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Install Playwright system dependencies + run: npx playwright install-deps + + - name: Install Playwright browsers + run: npx playwright install chromium + + - name: Run Playwright Tests + run: | + npx playwright test \ + recapp/tests/e2e/anon-sixQ-ans-allCorrect.wait.spec.ts \ + recapp/tests/e2e/anon-sixQ-ans-halfCorrect.spec.ts \ + --workers 1 \ + --repeat-each 50 \ + --timeout 60000 \ + --trace on + + - name: Upload Test Report as Artifact + uses: actions/upload-artifact@v3 + with: + name: playwright-report + path: recapp/tests/e2e/test-report/ + if-no-files-found: ignore