From e5735c79810e85e92aa6aa532311a29fcdd0fa84 Mon Sep 17 00:00:00 2001 From: Sai Krishna Vennamaneni Date: Sun, 12 Jul 2026 01:39:44 +0530 Subject: [PATCH] fix: add GitHub Actions CI + missing frontend Dockerfile so boilerplate runs end-to-end - .github/workflows/ci.yml: runs backend unit tests, evals (stub), frontend build, and deploys backend image on main - frontend/Dockerfile.frontend: was referenced by docker-compose.yml but missing, so 'docker compose up --build' failed Verified: backend tests 5 passed, evals 4 passed/1 skipped (live gated on key), frontend builds, live server returns 200 on /health /api/chat /goals /api/runs. --- .github/workflows/ci.yml | 55 ++++++++++++++++++++++++++++++++++++ frontend/Dockerfile.frontend | 11 ++++++++ 2 files changed, 66 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 frontend/Dockerfile.frontend diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3b0b7db --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,55 @@ +name: CI + +on: + push: + branches: [main, feature/v0.1] + pull_request: + +jobs: + backend: + runs-on: ubuntu-latest + defaults: + run: + working-directory: backend + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install + run: | + python -m venv .venv + . .venv/bin/activate + pip install -r requirements.txt + - name: Unit tests + run: | + . .venv/bin/activate + python -m pytest tests -v + - name: Evals (stub mode) + run: | + . .venv/bin/activate + cd .. && python -m pytest evals -v + + frontend: + runs-on: ubuntu-latest + defaults: + run: + working-directory: frontend + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "18" + - name: Install + run: npm install + - name: Build (tsc + vite) + run: npm run build + + deploy-image: + runs-on: ubuntu-latest + needs: [backend, frontend] + if: github.ref == 'refs/heads/main' + steps: + - uses: actions/checkout@v4 + - name: Build backend deploy image + run: docker build -f deploy/Dockerfile -t demo-agent-backend:ci . diff --git a/frontend/Dockerfile.frontend b/frontend/Dockerfile.frontend new file mode 100644 index 0000000..7d110d7 --- /dev/null +++ b/frontend/Dockerfile.frontend @@ -0,0 +1,11 @@ +# Dev image for the demo-agent frontend (Vite). +# Source is bind-mounted by docker-compose, so deps are installed at runtime +# into the /app/node_modules anonymous volume (populated on first start). +FROM node:18-alpine + +WORKDIR /app + +# Install dev/build tooling ahead of time; node_modules comes up at runtime. +EXPOSE 5173 + +CMD ["sh", "-c", "npm install && npm run dev -- --host 0.0.0.0 --port 5173"]