bidict/tox.ini

77 lines
2.1 KiB
INI
Raw Normal View History

2014-09-23 14:08:21 +00:00
[tox]
envlist =
# Use "python3.X" rather than "py3X" so env names match python executable names
python3.{12,11,10,9,8}
2023-10-01 19:01:48 +00:00
pypy3.{10,9}
benchmark
lint
docs
# do not include 'coverage' so it only runs when explicitly requested
skip_missing_interpreters = true
2014-09-23 14:08:21 +00:00
# Keep in sync with ./dev-deps/dev.env:
_default_py_minor_ver = 12
_default_req_dir = dev-deps/python3.{[tox]_default_py_minor_ver}
2014-09-23 14:08:21 +00:00
[testenv]
deps = -r dev-deps/{envname}/test.txt
# https://hynek.me/articles/turbo-charge-tox/
package = wheel
wheel_build_env = .pkg
2022-12-24 14:52:35 +00:00
passenv =
# https://docs.pytest.org/en/stable/example/simple.html
2022-12-24 14:52:35 +00:00
PYTEST_ADDOPTS
# https://docs.pytest.org/en/7.1.x/reference/reference.html#envvar-FORCE_COLOR
2022-12-24 14:52:35 +00:00
FORCE_COLOR
# https://hypothesis.readthedocs.io/en/latest/settings.html#hypothesis.settings.print_blob
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
CI
commands =
mypy bidict tests
pytest
2023-09-10 17:37:42 +00:00
[testenv:python3.12]
base_python = py312
[testenv:python3.11]
base_python = py311
[testenv:python3.10]
base_python = py310
[testenv:python3.9]
base_python = py39
[testenv:python3.8]
base_python = py38
[testenv:benchmark]
base_python = py3{[tox]_default_py_minor_ver}
deps = -r {[tox]_default_req_dir}/test.txt
commands = pytest -n0 --benchmark-autosave tests/microbenchmarks.py
[testenv:lint]
2024-01-09 18:59:27 +00:00
base_python = py3{[tox]_default_py_minor_ver}
deps = pre-commit
skip_install = true
commands = pre-commit run --all-files --verbose --show-diff-on-failure
[testenv:docs]
2024-01-09 18:59:27 +00:00
base_python = py3{[tox]_default_py_minor_ver}
deps = -r {[tox]_default_req_dir}/docs.txt
commands = sphinx-build -Wn --keep-going -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
[testenv:coverage]
2024-01-09 18:59:27 +00:00
base_python = py3{[tox]_default_py_minor_ver}
deps = -r {[tox]_default_req_dir}/test.txt
setenv =
# https://coverage.readthedocs.io/en/7.4.0/changes.html#version-7-4-0-2023-12-27
COVERAGE_CORE=sysmon
# https://hynek.me/articles/turbo-charge-tox/#coverage-enable-subprocess
COVERAGE_PROCESS_START={toxinidir}/.coveragerc
commands =
coverage run -m pytest
coverage combine
coverage report