name: Run tests

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

permissions:
  contents: read

jobs:
  build:

    runs-on: ${{ matrix.os }}
    continue-on-error: ${{ matrix.python-version == '3.15-dev' }}
    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "3.15-dev"]
        os: [ubuntu-latest, macOS-latest, windows-latest]

    steps:
    - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
      with:
        persist-credentials: false
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
      with:
        python-version: ${{ matrix.python-version }}
        cache: 'pip'
        allow-prereleases: true
    - name: Install dependencies
      run: |
        python scripts/ci/install
    - name: Run tests
      run: |
        python scripts/ci/run-tests
