From aee1c048b66ffdeb58339ff906fba872b012ada1 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 2 Jul 2026 14:46:32 +0200 Subject: [PATCH] ci: add .forgejo/workflows/ci.yml for rmi-backend Python CI: uv setup, ruff lint+format, mypy (warn), pytest (non-integration). Runs on docker-x64 runner on Talos. 44 tests exist, now they will run in CI. --- .forgejo/workflows/ci.yml | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .forgejo/workflows/ci.yml diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml new file mode 100644 index 0000000..3c88c43 --- /dev/null +++ b/.forgejo/workflows/ci.yml @@ -0,0 +1,49 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: docker-x64 + container: + image: python:3.11-slim + steps: + - uses: actions/checkout@v4 + + - name: Install system deps + run: | + apt-get update + apt-get install -y --no-install-recommends gcc libpq-dev curl git ca-certificates + rm -rf /var/lib/apt/lists/* + + - name: Install uv + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + echo "$HOME/.local/bin" >> $GITHUB_PATH + + - name: Setup Python + run: | + uv python install 3.11 + uv venv --python 3.11 .venv + + - name: Install dependencies + run: | + uv pip install --python .venv/bin/python -r requirements.txt + uv pip install --python .venv/bin/python -e ".[dev]" + + - name: Lint (ruff) + run: source .venv/bin/activate && ruff check . --exit-non-zero-on-fix + + - name: Format check (ruff) + run: source .venv/bin/activate && ruff format --check . + + - name: Type check (mypy) + run: source .venv/bin/activate && mypy app/ --ignore-missing-imports || true + continue-on-error: true + + - name: Test (pytest) + run: source .venv/bin/activate && pytest tests/ -x -q --tb=short -m "not integration" \ No newline at end of file