Some checks failed
CI / test (pull_request) Failing after 4s
- pyproject.toml: runtime deps (FastAPI, SQLAlchemy async, Pydantic, PyMuPDF, python-magic, Pillow, dateutil), dev group (pytest, pytest-asyncio, pytest-httpx, ruff, mypy), optional `ocr` extra that pulls surya-ocr + torch (kept optional so CI without GPU can run the base package). - pytest config: asyncio_mode=auto; `live` marker for tests that need a real Ollama/Surya (gated on IX_TEST_OLLAMA=1). - Single smoke test (tests/unit/test_scaffolding.py) verifies the package imports and exposes __version__ — keeps CI green until the real test modules land in later chunks. - .forgejo/workflows/ci.yml: runs ruff + pytest against a Postgres 16 service container. Explicit IX_TEST_MODE=fake keeps real-client tests out. - .env.example: every IX_* var from spec §9 with on-prem-friendly defaults. - uv.lock committed for reproducible builds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: docker
|
|
container:
|
|
image: python:3.12-slim
|
|
services:
|
|
postgres:
|
|
image: postgres:16
|
|
env:
|
|
POSTGRES_USER: test
|
|
POSTGRES_PASSWORD: test
|
|
POSTGRES_DB: ix_test
|
|
options: >-
|
|
--health-cmd="pg_isready -U test"
|
|
--health-interval=5s
|
|
--health-timeout=3s
|
|
--health-retries=10
|
|
|
|
env:
|
|
IX_POSTGRES_URL: postgresql+asyncpg://test:test@postgres:5432/ix_test
|
|
IX_TEST_MODE: fake
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install system deps for python-magic / PyMuPDF
|
|
run: |
|
|
apt-get update && apt-get install -y --no-install-recommends \
|
|
libmagic1 libgl1 libglib2.0-0
|
|
|
|
- name: Install uv
|
|
run: pip install --no-cache-dir uv
|
|
|
|
- name: Install project
|
|
run: uv sync --extra dev
|
|
|
|
- name: Lint
|
|
run: uv run ruff check src tests
|
|
|
|
- name: Unit + integration tests (no GPU, no live Ollama)
|
|
run: uv run pytest tests/unit tests/integration -v
|