Skip to content

Browser Tests

Browser Tests #9

Workflow file for this run

# Full-browser E2E suite (Playwright, ~30 min sequential) — nightly rather
# than per-PR: the suite drives real dev servers against a seeded database
# and shares state across specs (workers: 1), so it is too heavy for every
# push but too valuable to stay disabled (it was dark for 4 months and hid a
# broken dev-login redirect the unit/integration layers cannot see).
name: Browser Tests
on:
schedule:
- cron: '17 3 * * *' # nightly, 03:17 UTC
workflow_dispatch:
jobs:
playwright:
runs-on: ubuntu-latest
timeout-minutes: 60
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: agent_identity
POSTGRES_USER: agent_identity
POSTGRES_PASSWORD: agent_identity
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U agent_identity"
--health-interval 5s
--health-timeout 3s
--health-retries 5
env:
DATABASE_URL: postgresql://agent_identity:agent_identity@localhost:5432/agent_identity
RATE_LIMIT_ENABLED: 'false'
# This is a dev-mode E2E suite: locally apps/api/.env sets development
# mode and the API's dev auth bypass applies. CI had no NODE_ENV, so the
# API enforced auth and the seeded runtime-only key 403'd on every
# test-data agent creation (first dispatch, run 30450267639).
NODE_ENV: development
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24'
cache: 'npm'
- run: npm ci
- name: Generate Prisma client
working-directory: apps/api
run: npx prisma generate
- name: Build workspace dependencies
run: npx turbo build --filter=@sidclaw/shared --filter=@sidclaw/sdk
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Run browser tests
# playwright.config.ts starts the API and dashboard dev servers itself
run: npx playwright test
- name: Upload traces on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-traces
path: test-results/
retention-days: 7