Files
kg-scr/.github/workflows/tests.yml
Aman Nalakath 7de0e716eb
Some checks failed
tests / core (macos-latest, py3.11) (push) Has been cancelled
tests / core (macos-latest, py3.12) (push) Has been cancelled
tests / core (macos-latest, py3.13) (push) Has been cancelled
tests / core (ubuntu-latest, py3.11) (push) Has been cancelled
tests / core (ubuntu-latest, py3.12) (push) Has been cancelled
tests / core (ubuntu-latest, py3.13) (push) Has been cancelled
tests / doctor CLI smoke test (push) Has been cancelled
repo hygiene, tooling config, v0.2.0
- Untrack src/ocr_pipeline.egg-info from git, delete pyproject.toml~,
  stale run_008/run_009 dirs
- Ruff config moved to [tool.ruff.lint] (silences deprecation warning)
- Pre-commit: bump revs (ruff v0.14.13, mypy v1.18.1, hooks v6.0.0);
  drop redundant isort hook (ruff I already sorts imports)
- mypy: add ignore_missing_imports for optional deps; types-PyYAML in
  dev extras; python_version=3.12 for numpy 2.5 stubs compat; CI step
- Doctor: suppress paddle ccache UserWarning noise during check
- CHANGELOG dated for 0.2.0; README minimal-style rewrite with
  collapsible details sections
- Bump version to 0.2.0
2026-07-21 00:40:19 +02:00

69 lines
1.7 KiB
YAML

name: tests
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
core:
name: core (${{ matrix.os }}, py${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python
run: uv python install ${{ matrix.python-version }}
- name: Sync core dependencies
run: uv sync --frozen --all-extras
- name: Install Tesseract (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y tesseract-ocr
- name: Install Tesseract (macOS)
if: matrix.os == 'macos-latest'
run: brew install tesseract
- name: Run ruff
run: uv run ruff check src/ tests/
- name: Check formatting
run: uv run ruff format --check src/ tests/
- name: Run mypy
run: uv run mypy src/ocr_pipeline
- name: Run pytest
run: uv run pytest tests/ -q --maxfail=1
doctor-smoke:
name: doctor CLI smoke test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- run: uv sync --frozen
- name: Install Tesseract
run: sudo apt-get update && sudo apt-get install -y tesseract-ocr
- name: Run doctor
run: uv run ocr-pipeline doctor