| name | ci-local-parity |
| description | Run Volatio CI locally before pushing (ci-local.sh), mirrors GitHub Actions exactly, catches failures fast. Use when preparing to push, debugging CI failures, or verifying changes will pass. |
ci-local-parity
⛔ MANDATORY RULE: RUN BEFORE EVERY PUSH
You MUST run ./scripts/ci-local.sh and wait for completion before ANY git push.
Do NOT:
- Push without running local CI first
- Interrupt the script - it needs to complete fully
- Iterate on failures via remote CI (wastes 8-10 min per attempt)
When to Use
- ALWAYS before pushing changes to remote (non-negotiable)
- Debugging CI failures locally
- Verifying lint/typecheck/tests pass
- Ensuring schema changes work with CI database (postgres:16, not TimescaleDB)
Golden Path
./scripts/ci-local.sh
git push
Quick Variants
./scripts/ci-local.sh
./scripts/ci-local.sh --quick
./scripts/ci-local.sh --e2e-only
./scripts/ci-local.sh --no-python
make ci
make ci-quick
make ci-e2e
What the Script Checks
- ✅ Lint (Biome) - Same as CI
- ✅ Typecheck - Same as CI
- ✅ Unit Tests with Coverage - Same as CI
- ✅ Python Lint (Ruff) + Tests (pytest) - Same as CI
- ✅ E2E Tests (Playwright) - Using CI database
Why This Matters
- CI uses
postgres:16 (NOT TimescaleDB) - schema issues show up here
- CI uses a fresh database - tests must handle empty state
- CI environment variables differ from local dev
- Finding issues locally is 10x faster than waiting for CI
Common CI Failure Patterns
Lint Failures
pnpm lint
pnpm lint:fix
TypeScript Errors
pnpm typecheck
Unit Test Failures
pnpm test -- --run
Python Lint/Test Failures
cd research && ruff check .
cd research && pytest
E2E Test Failures
./scripts/e2e.sh e2e/failing-test.spec.ts --timeout=60000 --reporter=list
⚠️ CRITICAL: Preventing Test Hangs
Tests can hang silently without proper flags:
pnpm test
./scripts/e2e.sh
pnpm test -- --run
./scripts/e2e.sh --reporter=list
./scripts/ci-local.sh
If a command produces no output for 30+ seconds, it's probably hung. Kill it and use correct flags.
All Auth Tests Failing
If ALL auth tests fail (auth.spec.ts, server-health.spec.ts, auth.setup.ts), check:
- Next.js warmup missing - Dashboard must be warmed up before tests run
- AUTH_SECRET mismatch - API and Dashboard must use same secret
- Admin user not seeded - Test user
admin@volatio.io must exist
The ci-local.sh script handles all these, but manual test runs might miss them.
Debug Checklist for CI Failures
- Check if services are running:
docker compose ps
- Check database exists: Run docker-db-queries skill
- Check for schema drift:
pnpm --filter @volatio/db push
- Check test user is seeded:
./scripts/e2e.sh handles this
- Check for port zombies:
make kill-servers
- Check Next.js cache:
rm -rf apps/dashboard/.next