name: ci-testing

on:
  push:
    branches:
      - "master"
  workflow_call:
  pull_request:

jobs:
  unittests:
    strategy:
      fail-fast: false
      matrix:
        os: [ ubuntu-latest, windows-latest ]
        python-version: [ "3.9", "3.10", "3.11", "3.12" ]
    runs-on: ${{ matrix.os }}
    name: Tests (${{ matrix.os }} / Python ${{ matrix.python-version }})
    steps:
    - name: Checkout dandeliion-client repo
      uses: actions/checkout@v4

    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}

    - name: Set up uv
      run: python -m pip install uv

    - name: Install nox
      run: python -m uv pip install nox[uv]

    - name: Run unit tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
      run: python -m nox
