---
name: Checks

on:
    push:
        branches:
            - master
    pull_request:
        branches:
            - master

jobs:
    build:
        runs-on: ubuntu-latest

        strategy:
            fail-fast: false
            matrix:
                include:
                    # Keep in sync with .readthedocs.yml
                    - python-version: '3.14'
                      env:
                          TOXENV: docs
                    - python-version: '3.14'
                      env:
                          TOXENV: pre-commit
                    - python-version: '3.14'
                      env:
                          TOXENV: pylint
                    - python-version: '3.14'
                      env:
                          TOXENV: typing
                    - python-version: '3.14'
                      env:
                          TOXENV: twinecheck

        steps:
            - uses: actions/checkout@v6

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

            - name: Run check
              env: ${{ matrix.env }}
              run: |
                  pip install --upgrade pip
                  pip install --upgrade tox
                  tox
