Create demo_app.py #18
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", "master"] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| # ── Docker Compose build ───────────────────────────────────────────────── | |
| compose-build: | |
| name: Docker Compose build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Copy env defaults | |
| run: cp .env.example .env | |
| - name: Build all images | |
| run: docker compose build --parallel | |
| # ── Go ingestion service ───────────────────────────────────────────────── | |
| go-build: | |
| name: Go — build & vet | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ingestion-service | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.21" | |
| - run: go mod download | |
| - run: go vet ./... | |
| - run: go build ./... | |
| # ── C++ drift engine ───────────────────────────────────────────────────── | |
| cpp-build: | |
| name: C++ — build drift engine | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build C++ Drift Engine | |
| run: | | |
| cd drift-engine | |
| g++ -O2 -std=c++17 -o drift_engine drift_engine.cpp | |
| # ── Python services ────────────────────────────────────────────────────── | |
| python-lint: | |
| name: Python — lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install linter | |
| run: pip install ruff | |
| - name: Lint llm-guard | |
| run: ruff check llm-guard/ | |
| - name: Lint drift-engine server | |
| run: ruff check drift-engine/server.py | |
| - name: Lint streamlit-dashboard | |
| run: ruff check streamlit-dashboard/ | |
| # ── Python tests ───────────────────────────────────────────────────────── | |
| python-test: | |
| name: Python — pytest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run tests | |
| run: python -m pytest tests/ -v |