Skip to content

Bump @xmldom/xmldom and msw #263

Bump @xmldom/xmldom and msw

Bump @xmldom/xmldom and msw #263

Workflow file for this run

name: E2E Testing
on:
workflow_dispatch:
pull_request:
branches: [develop]
jobs:
test-e2e:
environment: e2e-tests
timeout-minutes: 60
runs-on: ubuntu-latest
services:
# Local mail catcher: the app sends verification emails here over SMTP (port 1025)
# and the e2e tests read them back via Mailpit's REST API (port 8025)
mailpit:
image: axllent/mailpit:latest
ports:
- 1025:1025
- 8025:8025
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: '18.20.x'
cache: 'npm'
- name: Create .env file
run: cp .env.example .env
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0
with:
mongodb-version: '6.0'
- name: Install dependencies
run: npm ci
- name: Cache Playwright browsers
uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: playwright-${{ hashFiles('package-lock.json') }}
- name: Install Playwright Browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: npx playwright install --with-deps chromium
- name: Install Playwright deps (OS libraries)
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps chromium
- name: Start app
run: npm run start:e2e > app.log 2>&1 &
- name: Wait for app to be ready
run: |
npx wait-on@7 http://localhost:9000 --timeout 180000 || {
echo "::error::App failed to become ready at http://localhost:9000 within 180s"
echo "----- app.log -----"
cat app.log
exit 1
}
- name: Run Playwright tests
run: npm run e2e:ci
- name: Upload artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
retention-days: 30