Skip to content

feat: playwright tests #16

feat: playwright tests

feat: playwright tests #16

Workflow file for this run

name: E2E tests
on:
push:
branches: [ main, master, next ]
pull_request:
workflow_dispatch:
jobs:
run-tests:
name: 'Run e2e tests'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
# Cache playwright browsers
# @see https://justin.poehnelt.com/posts/caching-playwright-in-github-actions/
- uses: actions/cache@v3
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Bundle library
run: npm run build
- name: Install playwright browsers
run: npx playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
- name: Run tests
run: npx playwright test --config ./tests/config/playwright.config.ts