diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0c7184e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: CI + +on: + pull_request: + push: + branches: [master] + +jobs: + test: + name: pytest + runs-on: ubuntu-latest + + env: + PYTHONUNBUFFERED: "1" + SESSION_SECRET_KEY: "ci-only-session-secret-key-with-enough-length" + OPENROUTER_API_KEY: "ci-dummy-openrouter-key" + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: pip + + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + python -m pip install pytest requests python-dotenv ollama psycopg SQLAlchemy + + - name: Compile Python files + run: python -m compileall backend model_gateway evaluation tests + + - name: Run smoke tests + run: | + pytest -q \ + tests/test_network_safety.py \ + tests/api/test_config.py \ + tests/model_gateway/test_openrouter_provider.py \ + tests/generation/test_orchestrator.py \ + tests/grounding/test_citations.py \ + tests/evaluation/test_wilson_intervals.py