From d2c657b05b0974271fa4aea896586ad22367a1ae Mon Sep 17 00:00:00 2001 From: MrAshki Date: Mon, 10 Aug 2026 04:42:17 +0330 Subject: [PATCH 1/9] Add CI workflow --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..69b60f1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI + +on: + pull_request: + push: + branches: [master] + +jobs: + test: + name: pytest + runs-on: ubuntu-latest + + env: + PYTHONUNBUFFERED: "1" + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: pip + + - name: Install system OCR dependency + run: | + sudo apt-get update + sudo apt-get install -y tesseract-ocr tesseract-ocr-fas + + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + python -m pip install torch --index-url https://download.pytorch.org/whl/cpu + python -m pip install -r requirements.txt + + - name: Run tests + run: pytest -q From 3faf11cdebd3370f87b1c00385b1c2b15ea7fa30 Mon Sep 17 00:00:00 2001 From: MrAshki Date: Mon, 10 Aug 2026 04:45:09 +0330 Subject: [PATCH 2/9] Set CI session secret --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69b60f1..68e33d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,7 @@ jobs: env: PYTHONUNBUFFERED: "1" + SESSION_SECRET_KEY: "ci-only-session-secret-key-with-enough-length" steps: - name: Checkout From adeb6e5c4266a392753b6d25eda89e9c6f458526 Mon Sep 17 00:00:00 2001 From: MrAshki Date: Mon, 10 Aug 2026 04:47:23 +0330 Subject: [PATCH 3/9] Set CI OpenRouter placeholder --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68e33d5..84b54dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,7 @@ jobs: env: PYTHONUNBUFFERED: "1" SESSION_SECRET_KEY: "ci-only-session-secret-key-with-enough-length" + OPENROUTER_API_KEY: "ci-dummy-openrouter-key" steps: - name: Checkout From 1b55136f9ceb701830e46d5e8cb81a8026b73510 Mon Sep 17 00:00:00 2001 From: MrAshki Date: Mon, 10 Aug 2026 04:52:01 +0330 Subject: [PATCH 4/9] Use smoke tests for CI --- .github/workflows/ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84b54dd..d9c9518 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,5 +36,16 @@ jobs: python -m pip install torch --index-url https://download.pytorch.org/whl/cpu python -m pip install -r requirements.txt - - name: Run tests - run: pytest -q + - 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/api/test_health.py \ + tests/model_gateway/test_openrouter_provider.py \ + tests/generation/test_orchestrator.py \ + tests/grounding/test_citations.py \ + tests/evaluation/test_wilson_intervals.py From 2a4e8ec5eda174dfb1b974fee75400f4538886ce Mon Sep 17 00:00:00 2001 From: MrAshki Date: Mon, 10 Aug 2026 04:55:08 +0330 Subject: [PATCH 5/9] Keep RAG CI smoke tests local --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9c9518..b533006 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,6 @@ jobs: pytest -q \ tests/test_network_safety.py \ tests/api/test_config.py \ - tests/api/test_health.py \ tests/model_gateway/test_openrouter_provider.py \ tests/generation/test_orchestrator.py \ tests/grounding/test_citations.py \ From 2b8415bce6eeff9006cfba892f597b173c456b7a Mon Sep 17 00:00:00 2001 From: MrAshki Date: Mon, 10 Aug 2026 04:57:20 +0330 Subject: [PATCH 6/9] Use minimal RAG CI dependencies --- .github/workflows/ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b533006..7cbf46c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,16 +25,10 @@ jobs: python-version: "3.12" cache: pip - - name: Install system OCR dependency - run: | - sudo apt-get update - sudo apt-get install -y tesseract-ocr tesseract-ocr-fas - - name: Install Python dependencies run: | python -m pip install --upgrade pip - python -m pip install torch --index-url https://download.pytorch.org/whl/cpu - python -m pip install -r requirements.txt + python -m pip install pytest requests - name: Compile Python files run: python -m compileall backend model_gateway evaluation tests From cf2e1ba23a74146e59d27e5e76c5a5d06a288afb Mon Sep 17 00:00:00 2001 From: MrAshki Date: Mon, 10 Aug 2026 04:58:21 +0330 Subject: [PATCH 7/9] Install smoke test dependencies --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cbf46c..5903866 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - python -m pip install pytest requests + python -m pip install pytest requests python-dotenv ollama - name: Compile Python files run: python -m compileall backend model_gateway evaluation tests From 92ffc37b7934e56be54ca65155c7d6e303873723 Mon Sep 17 00:00:00 2001 From: MrAshki Date: Mon, 10 Aug 2026 04:59:20 +0330 Subject: [PATCH 8/9] Install config smoke dependency --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5903866..53c0bb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - python -m pip install pytest requests python-dotenv ollama + python -m pip install pytest requests python-dotenv ollama psycopg - name: Compile Python files run: python -m compileall backend model_gateway evaluation tests From 32f6b84ba1199c5993858d2a77064e35c07c726c Mon Sep 17 00:00:00 2001 From: MrAshki Date: Mon, 10 Aug 2026 05:00:27 +0330 Subject: [PATCH 9/9] Install SQLAlchemy for config smoke test --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53c0bb4..0c7184e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - python -m pip install pytest requests python-dotenv ollama psycopg + python -m pip install pytest requests python-dotenv ollama psycopg SQLAlchemy - name: Compile Python files run: python -m compileall backend model_gateway evaluation tests