feat: playwright tests #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') }} | |
- run: npm ci | |
- run: npx playwright install --with-deps | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
- run: npx playwright install-deps | |
if: steps.playwright-cache.outputs.cache-hit == 'true' | |
- run: npm run build | |
- name: Run tests | |
run: npx playwright test --config ./tests/config/playwright.config.ts |