name: pytest on: workflow_call: permissions: {} jobs: pytest: name: Run tests runs-on: ${{ matrix.os }}-latest env: PYTEST_ADDOPTS: "--run-integration --showlocals -vv --durations=10 --reruns 5 --only-rerun subprocess.CalledProcessError" strategy: fail-fast: false matrix: os: - ubuntu - macos - windows py: - "pypy3.10-v7.3.19" - "pypy3.11-v7.3.19" - "3.15" - "3.14" - "3.13" - "3.12" - "3.11" - "3.10" tox-target: - "tox" - "min" continue-on-error: >- # jobs not required in branch protection ${{ ( startsWith(matrix.py, 'pypy') && matrix.os == 'windows' ) && true || false }} steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 0 persist-credentials: false - name: Setup uv uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 - name: Install tox (uv) run: uv tool install tox --with tox-uv - name: Setup python for test ${{ matrix.py }} uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: ${{ matrix.py }} allow-prereleases: true - name: Run test suite via tox if: matrix.tox-target == 'tox' shell: bash run: | PYTHON_VERSION=$PYTHON_VERSION_RAW BASE=${PYTHON_VERSION%-*} tox -vv --notest -e $BASE tox -e $BASE --skip-pkg-install env: PYTHON_VERSION_RAW: ${{ matrix.py }} - name: Run minimum version test if: matrix.tox-target == 'min' shell: bash run: | PYTHON_VERSION=$PYTHON_VERSION_RAW BASE=${PYTHON_VERSION%-*} tox -e $TOX_TARGET-$BASE env: PYTHON_VERSION_RAW: ${{ matrix.py }} TOX_TARGET: ${{ matrix.tox-target }} - name: Run path test if: matrix.tox-target == 'tox' && matrix.py == '3.10' run: tox -e path - name: Combine coverage files if: always() run: tox -e coverage - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 if: always() env: PYTHON: ${{ matrix.python }} with: files: .tox/coverage.xml flags: tests env_vars: PYTHON name: ${{ matrix.py }} - ${{ matrix.os }} - ${{ matrix.tox-target }}