[tox]
isolated_build = true
envlist =
  py{310,311,312,313,314},
  coverage-report

[gh-actions]
python =
    3.10: py310
    3.11: py311
    3.12: py312
    3.13: py313
    3.14: py314

[testenv]
extras =
  tests
  cov
setenv =
    COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
    COLUMNS=80
    NO_COLOR=1
commands =
  coverage run -m pytest {posargs:-n auto --durations=10} test
  coverage combine --keep
  coverage report
  coverage xml -i
allowlist_externals =
  coverage

[testenv:coverage-report]
description = Report coverage over all measured test runs.
basepython = python3.11
deps = coverage[toml]>=5.3
skip_install = true
depends = py{310,311,312,313,314}
commands =
    coverage combine
    coverage report
    coverage xml -i {posargs:}
