* Fix mypy errors and apply ruff formatting across packages Fix ast.FunctionDef calls missing type_params for Python 3.12+, correct type: ignore error codes in _comparator and _plugin, and run ruff format on all package source and test files. * Switch CI to prek for lint/typecheck checks Use j178/prek-action for consistent lint+typecheck (ruff check, ruff format, interrogate, mypy) matching local pre-commit config. Keep test as a separate parallel job for test-env support.
57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
concurrency:
|
|
group: ci-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
prek:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: astral-sh/setup-uv@v8.0.0
|
|
with:
|
|
python-version: "3.12"
|
|
enable-cache: true
|
|
- run: uv sync --all-packages
|
|
- uses: j178/prek-action@v2
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: astral-sh/setup-uv@v8.0.0
|
|
with:
|
|
python-version: "3.12"
|
|
enable-cache: true
|
|
- run: uv sync --all-packages
|
|
- name: Test
|
|
run: uv run pytest packages/ -v
|
|
env:
|
|
CI: "true"
|
|
|
|
version:
|
|
if: github.event_name == 'pull_request'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: astral-sh/setup-uv@v8.0.0
|
|
with:
|
|
python-version: "3.12"
|
|
enable-cache: true
|
|
- run: uv sync --all-packages
|
|
- name: Check version bump
|
|
run: uv run python scripts/versioning.py check-version
|