test: initial end to end test with playwright

This commit is contained in:
Edouard Vanbelle
2026-05-04 15:28:44 +02:00
parent 52f4a865a9
commit 3c3d24ac72
28 changed files with 494 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
name: Playwright Test (end-to-end)
# IMPORTANT: using Swatinem/rust-cache@v2 : reuse same cache as ci.yml (minimize non necessary new compilation)
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
concurrency:
group: rust-build-${{ github.ref }}
cancel-in-progress: false
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
working-directory: tests/e2e
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust build
uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install Node dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Run Playwright tests (spawns DB via pretest hook)
run: npm test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: tests/e2e/playwright-report/
retention-days: 30