feat: add e2e testing setup for web app #1
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: Playwright Tests | |
on: | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
inputs: | |
sha: | |
type: string | |
required: false | |
description: Target SHA | |
jobs: | |
test: | |
name: Run Playwright Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v4 | |
if: ${{ github.event_name != 'workflow_dispatch' }} | |
- uses: actions/checkout@v4 | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
with: | |
ref: ${{ github.event.inputs.sha }} | |
- name: Setup node environment | |
uses: ./.github/actions/init-env-node | |
- name: Install Playwright Browsers | |
run: pnpm exec playwright install --with-deps | |
- name: Run Playwright tests | |
run: pnpm exec playwright test | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |