fix: remove pool_size/max_overflow when using NullPool in alembic mig… #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| python-quality: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-dev.txt | |
| pip install -e core -e planners -e worldmodels -e agents -e server | |
| - name: Ruff | |
| run: | | |
| python -m ruff check . | |
| python -m ruff format --check . | |
| - name: Pytest | |
| run: python -m pytest | |
| web-build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: web | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: web/package-lock.json | |
| - name: Install web dependencies | |
| run: npm ci | |
| - name: Build Next.js app | |
| env: | |
| NEXT_PUBLIC_API_BASE: http://localhost:8000 | |
| run: npm run build | |
| web-e2e: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-dev.txt | |
| pip install -e core -e planners -e worldmodels -e agents -e server | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: web/package-lock.json | |
| - name: Install web dependencies | |
| working-directory: web | |
| run: npm ci | |
| - name: Install Playwright browser | |
| working-directory: web | |
| run: npx playwright install --with-deps chromium | |
| - name: Start API server | |
| run: | | |
| mkdir -p .tmp | |
| WMG_DB_URL=sqlite:///./.tmp/e2e.db \ | |
| WMG_STORAGE_DIR=./.tmp/e2e-storage \ | |
| WMG_UPLOAD_TOKEN=e2e-token \ | |
| WMG_AUTO_MIGRATE=true \ | |
| WMG_ENABLE_METRICS=false \ | |
| WMG_SEED_DEMO_DATA=true \ | |
| python -m uvicorn worldmodel_server.main:app --host 127.0.0.1 --port 8100 > .tmp/e2e-api.log 2>&1 & | |
| echo $! > .tmp/e2e-api.pid | |
| - name: Start web server | |
| run: | | |
| mkdir -p .tmp | |
| cd web | |
| INTERNAL_API_BASE=http://127.0.0.1:8100 \ | |
| NEXT_PUBLIC_API_BASE=http://127.0.0.1:8100 \ | |
| npm run dev -- --hostname 127.0.0.1 --port 3100 > ../.tmp/e2e-web.log 2>&1 & | |
| echo $! > ../.tmp/e2e-web.pid | |
| - name: Wait for local services | |
| run: | | |
| python - <<'PY' | |
| import sys | |
| import time | |
| from urllib.request import urlopen | |
| targets = [ | |
| "http://127.0.0.1:8100/healthz", | |
| "http://127.0.0.1:3100", | |
| ] | |
| deadline = time.time() + 120 | |
| pending = set(targets) | |
| while pending and time.time() < deadline: | |
| for target in list(pending): | |
| try: | |
| with urlopen(target, timeout=2) as response: | |
| if response.status < 500: | |
| pending.remove(target) | |
| except Exception: | |
| pass | |
| if pending: | |
| time.sleep(2) | |
| if pending: | |
| raise SystemExit(f"Services did not start in time: {sorted(pending)}") | |
| PY | |
| - name: Run Playwright smoke tests | |
| working-directory: web | |
| env: | |
| PLAYWRIGHT_DISABLE_WEBSERVER: "1" | |
| run: npm run test:e2e | |
| - name: Dump server logs on failure | |
| if: failure() | |
| run: | | |
| echo "===== API LOG =====" | |
| cat .tmp/e2e-api.log || true | |
| echo "===== WEB LOG =====" | |
| cat .tmp/e2e-web.log || true | |
| - name: Stop background services | |
| if: always() | |
| run: | | |
| kill $(cat .tmp/e2e-api.pid) 2>/dev/null || true | |
| kill $(cat .tmp/e2e-web.pid) 2>/dev/null || true |