ci(e2e): add Playwright smoke tests to deploy-test workflow
Completes Epic #37 remaining scope: - playwright.ci.config.ts — targets localhost:3100 (already-running Docker app), testMatch restricted to smoke.spec.ts, HTML report on failure - e2e/smoke.spec.ts — 5 tests: health endpoint, unauth redirect, signin page render, admin login redirect, app shell nav visible - deploy-test.yml — seed admin user via docker exec, setup Node 20, install Playwright 1.49 + Chromium, run smoke tests, upload report artifact on failure Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -57,6 +57,34 @@ jobs:
|
||||
echo "$BODY"
|
||||
echo "$BODY" | grep '"status":"ok"'
|
||||
|
||||
- name: Seed admin user
|
||||
run: |
|
||||
docker compose exec -T app node /app/scripts/setup-admin.mjs \
|
||||
--email admin@capakraken.dev \
|
||||
--name "Admin" \
|
||||
--password admin123
|
||||
|
||||
- name: Set up Node.js 20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- name: Install Playwright and Chromium
|
||||
run: |
|
||||
npm install -g @playwright/test@1.49
|
||||
playwright install chromium --with-deps
|
||||
|
||||
- name: Run smoke tests
|
||||
run: npx playwright test --config apps/web/playwright.ci.config.ts
|
||||
|
||||
- name: Upload Playwright report
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: playwright-smoke-report
|
||||
path: apps/web/playwright-report/
|
||||
retention-days: 7
|
||||
|
||||
- name: Show logs on failure
|
||||
if: failure()
|
||||
run: docker compose logs --tail=100
|
||||
|
||||
Reference in New Issue
Block a user