name: CI

on:
  pull_request:
    branches:
      - main

jobs:
  CI:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        python-version: ["3.10", "3.11", "3.12", "3.13"]

    steps:
      - uses: actions/checkout@v4

      - uses: astral-sh/setup-uv@v4
        with:
          version: ">0.5.0"
          enable-cache: true
          cache-dependency-glob: "uv.lock"

      - run: uv python install ${{ matrix.python-version }}
      - run: uv sync --all-extras

      - name: pre-commit
        run: uv run pre-commit run --all-files

      - name: testing
        run: uv run pytest tests
