2020-10-06 14:53:37 +00:00
|
|
|
[tox]
|
2023-01-14 11:40:46 +00:00
|
|
|
minversion = 4.0.0
|
2020-10-06 14:53:37 +00:00
|
|
|
envlist =
|
|
|
|
lint
|
|
|
|
docs
|
2023-01-14 11:40:46 +00:00
|
|
|
py{37,38,39,310,311}
|
2020-10-06 14:53:37 +00:00
|
|
|
isolated_build = True
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
description = Run unit-testing
|
|
|
|
deps =
|
2021-04-24 10:49:13 +00:00
|
|
|
poetry
|
2020-10-06 14:53:37 +00:00
|
|
|
# do not put * in passenv as it may break builds due to reduced isolation
|
|
|
|
passenv =
|
|
|
|
CI
|
|
|
|
GITHUB_*
|
|
|
|
HOME
|
|
|
|
PYTEST_*
|
|
|
|
SSH_AUTH_SOCK
|
|
|
|
TERM
|
|
|
|
setenv =
|
|
|
|
PYTHONDONTWRITEBYTECODE=1
|
|
|
|
PYTHONUNBUFFERED=1
|
|
|
|
commands =
|
2021-04-24 10:49:13 +00:00
|
|
|
poetry install
|
2020-10-06 14:53:37 +00:00
|
|
|
pytest --cov-report term-missing --cov=rich tests/ {posargs}
|
|
|
|
|
|
|
|
[testenv:lint]
|
|
|
|
description = Runs all linting tasks
|
2023-01-14 11:40:46 +00:00
|
|
|
commands_pre =
|
|
|
|
poetry install -vv --with lint
|
2020-10-06 14:53:37 +00:00
|
|
|
commands =
|
2023-01-14 11:40:46 +00:00
|
|
|
; poetry install --only dev
|
|
|
|
# as long GHA pipelines are not configured to use tox, we should call
|
|
|
|
# `make` in order to make testing similar and prevent divergence.
|
|
|
|
make format-check
|
|
|
|
make typecheck
|
|
|
|
deps =
|
|
|
|
poetry
|
2020-10-06 14:53:37 +00:00
|
|
|
skip_install = true
|
2023-01-14 11:40:46 +00:00
|
|
|
allowlist_externals =
|
|
|
|
make
|
|
|
|
poetry
|
2020-10-06 14:53:37 +00:00
|
|
|
|
|
|
|
[testenv:docs]
|
|
|
|
description = Builds documentation
|
|
|
|
changedir = docs
|
|
|
|
deps =
|
|
|
|
-r docs/requirements.txt
|
|
|
|
commands =
|
|
|
|
sphinx-build -M html source build
|