name: Run Python Unit Tests

on:
  workflow_call:
  workflow_dispatch:
  pull_request:
    branches:
      - master

permissions: {}

jobs:
  tests:
    strategy:
      fail-fast: false
      matrix:
        os:
          - macos-15
          - ubuntu-24.04
          - windows-2022
        python-version:
          - '3.9'
          - '3.10'
          - '3.11'
          - '3.12'
          - '3.13.8'
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v5.0.0
      - name: Install Python 3
        uses: actions/setup-python@v6.0.0
        with:
          cache: 'pip'
          check-latest: true
          python-version: ${{ matrix.python-version }}
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip setuptools wheel
          pip install tox tox-gh-actions
      - name: Test with tox
        run: tox
