name: Tests

on:
  push:
    branches:
    - main
  pull_request:
    branches:
    - main

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
    steps:
      - uses: actions/checkout@v4
      - uses: astral-sh/setup-uv@v5
        with:
          python-version: "${{ matrix.python-version }}"
      - name: setup
        run: uv sync --dev
      - run: uv run coverage run -m unittest
        env:
          PYTHONWARNINGS: error
      - name: gather XML coverage data
        run: uv run coverage xml
      - uses: codecov/codecov-action@v5
