ci: e2e workflow (workflow_dispatch) + changelog (B3 done)
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
name: e2e
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
e2e:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
- name: Start dev stack
|
||||
working-directory: deploy
|
||||
env:
|
||||
JWT_SECRET: ci-e2e-only-secret
|
||||
ADMIN_USER: admin
|
||||
ADMIN_PASSWORD: ci-e2e-password
|
||||
run: docker compose -f docker-compose.dev.yml up -d --build
|
||||
- name: Wait for web
|
||||
run: |
|
||||
for i in $(seq 1 90); do
|
||||
if curl -fsS http://localhost:5173/ >/dev/null 2>&1; then exit 0; fi
|
||||
sleep 5
|
||||
done
|
||||
echo "web not up in 450s"; docker compose -f deploy/docker-compose.dev.yml logs --tail 50; exit 1
|
||||
- run: cd frontend && npm ci
|
||||
- run: cd frontend && npx playwright install --with-deps chromium
|
||||
- name: Run e2e
|
||||
working-directory: frontend
|
||||
env:
|
||||
E2E_ADMIN_USER: admin
|
||||
E2E_ADMIN_PASSWORD: ci-e2e-password
|
||||
run: npx playwright test
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: playwright-report
|
||||
path: frontend/playwright-report
|
||||
Reference in New Issue
Block a user