Skip to content

Fix API redirect leaks, graph zoom, and add Projects page. #38

Fix API redirect leaks, graph zoom, and add Projects page.

Fix API redirect leaks, graph zoom, and add Projects page. #38

name: Project Health
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
workflow_dispatch:
jobs:
health-report:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: teamgraph
POSTGRES_PASSWORD: testpass
POSTGRES_DB: teamgraph_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
# ─── Python setup ───────────────────────────────────────────────
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: apps/api/requirements.txt
- name: Install API dependencies
run: |
cd apps/api
pip install -r requirements.txt
pip install pytest pytest-cov
# ─── Node setup ─────────────────────────────────────────────────
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: |
apps/web/package-lock.json
packages/teamgraph-mcp/package-lock.json
- name: Install Web dependencies
run: cd apps/web && npm ci
- name: Install MCP dependencies
run: cd packages/teamgraph-mcp && npm ci
# ─── Run health checks ──────────────────────────────────────────
- name: Run project health report
env:
DATABASE_URL: "postgresql://teamgraph:testpass@localhost:5432/teamgraph_test"
SECRET_KEY: "ci-test-secret-key-not-real"
DEMO_MODE: "false"
NEO4J_URI: "bolt://127.0.0.1:1"
GEMINI_API_KEY: ""
OPENAI_API_KEY: ""
run: python scripts/project_health.py --ci
# ─── Upload artifacts ───────────────────────────────────────────
- name: Upload health reports
if: always()
uses: actions/upload-artifact@v4
with:
name: health-reports
path: reports/latest/
retention-days: 30
# ─── Job summary ────────────────────────────────────────────────
- name: Add job summary
if: always()
run: |
if [ -f reports/latest/health-report.md ]; then
cat reports/latest/health-report.md >> $GITHUB_STEP_SUMMARY
else
echo "⚠️ Health report was not generated." >> $GITHUB_STEP_SUMMARY
fi