-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
48 lines (42 loc) · 1.31 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
[tox]
requires = tox>=4
envlist = type, lint, coverage, py{38,39,310,311,312}-tests
[testenv]
description = Base Environment
extras = test
set_env =
COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
commands_pre =
{envpython} --version
commands =
coverage run --rcfile pyproject.toml -m pytest {posargs}
[testenv:py{38,39,310,311,312}-tests]
description = Run Unit Tests
commands_pre =
{envpython} --version
python -c 'import pathlib; pathlib.Path("{env_site_packages_dir}/cov.pth").write_text("import coverage; coverage.process_startup()")'
[testenv:coverage]
description = Report Code Coverage
skip_install = true
deps = coverage
parallel_show_output = true
depends = py{38,39,310,311,312}-tests
commands =
coverage combine --quiet --rcfile pyproject.toml
coverage report --rcfile pyproject.toml {posargs}
[testenv:type]
description = Run Static Type Check
extras = type
commands =
mypy --config-file pyproject.toml {posargs: src}
[testenv:lint]
description = Run Code Linting
extras = lint
commands =
ruff check --config pyproject.toml {posargs: src}
ruff format --check --config pyproject.toml {posargs: src}
pylint --rcfile pyproject.toml {posargs: src}
; [testenv:docs]
; changedir = doc
; extras = docs
; commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html