test: add github actions playwright workflow

This commit is contained in:
rusconn
2023-10-14 10:57:02 +09:00
parent 6c7f03d3fe
commit b0d5afe08b
3 changed files with 43 additions and 5 deletions

33
.github/workflows/playwright.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Playwright Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build app
run: pnpm build
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm exec playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30