name: Main

on:
    push:
        branches:
            - devel

jobs:
    tox:
        name: Tox with ${{ matrix.python-version }} on ${{ matrix.os }}
        runs-on: ${{ matrix.os }}
        strategy:
            matrix:
                os: [ubuntu-latest, macos-latest, windows-latest]
                python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
                exclude:
                    - os: macos-latest
                      python-version: '3.9'
                    - os: windows-latest
                      python-version: '3.9'
            fail-fast: false
        steps:
            - name: Check out
              uses: actions/checkout@v4
              with:
                  fetch-depth: 0

            - name: Install uv
              uses: astral-sh/setup-uv@v5
              with:
                  # Install a specific version of uv.
                  version: '0.6.6'

            - name: Setup python for test ${{ matrix.python-version }}
              uses: actions/setup-python@v5
              with:
                  python-version: ${{ matrix.python-version }}

            - name: Install dependencies
              run: uv sync --all-extras --dev

            - name: Test with tox
              run: uv run tox
