DealDocumentScreening/.forgejo/workflows/ci.yml
febux c64f8ac3b7
Some checks are pending
ci / test (push) Waiting to run
Forgejo workflows were added. Nomad config was created.
2026-09-13 22:09:10 +03:00

43 lines
1.1 KiB
YAML

# CI: lint + typecheck + unit tests on every branch / PR.
#
# Self-contained on purpose: python:3.14-trixie has git built in, so no
# node/actions-checkout dependency; uv comes from PyPI (both reachable from
# the runner network). Mirrors the Makefile lint/test-unit targets.
name: ci
on:
push:
branches: ["**"]
pull_request:
jobs:
test:
runs-on: docker
container:
image: python:3.14-trixie
steps:
- name: Checkout (sha-pinned, no node actions needed)
run: |
git init -q .
git remote add origin ${{ gitea.server_url }}/${{ gitea.repository }}.git
git fetch --depth 1 origin ${{ gitea.sha }}
git checkout -q FETCH_HEAD
- name: Install uv
run: pip install --quiet uv
- name: Sync dev dependencies
run: uv sync --group dev --frozen
- name: Lint (ruff)
run: |
uv run ruff check src tests
uv run ruff format --check src tests
uv run isort --check-only src tests
- name: Typecheck (ty)
run: uv run ty check src
- name: Unit tests
run: uv run pytest -m "not integration" tests/unit