name: Run tests

on:
  push:
  pull_request:
    branches-ignore: [ master ]

permissions:
  contents: read

jobs:
  build:

    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
        os: [ubuntu-latest, macOS-latest, windows-latest]

    steps:
    - uses: actions/checkout@v6.0.1
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v6
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python scripts/ci/install
        python scripts/ci/install-check
    - name: Run tests
      run: python scripts/ci/run-tests --with-cov
    - name: Run checks
      run: python scripts/ci/run-check
    - name: codecov
      uses: codecov/codecov-action@v5
      with:
        directory: tests
