-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
71 lines (64 loc) · 1.6 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
[tox]
isolated_build = true
skip_missing_interpreters = True
set_env =
TEMP = {env_tmp_dir}
envlist =
py3{9,10,11},
pre-commit,
labels =
tests = py3{9,10,11}
[gh]
python =
3.9 = py39
3.10 = py310
3.11 = py311
[testenv]
parallel_show_output = true
allowlist_externals =
poetry
commands_pre =
poetry install --no-root
commands =
poetry run pytest --cov --cov-config=pyproject.toml --cov-append --cov-report term-missing --doctest-modules --cov-report xml:{toxworkdir}/.coverage.{envname}.xml -ra -q -n auto
coverage xml -o {toxworkdir}/.coverage.{envname}.xml
set_env =
PIP_DISABLE_VERSION_CHECK = 1
COVERAGE_FILE={toxworkdir}/.coverage.{envname}
depends =
py3{9,10,11}: clean
[testenv:pre-commit]
skip_install =
true
deps =
pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:lint]
skip_install =
true
deps =
pre-commit
commands =
pre-commit run --all-files ruff
[testenv:lint-fix]
skip_install =
true
deps =
pre-commit
commands =
pre-commit run --all-files ruff --hook-stage manual
[testenv:docs]
deps =
sphinx
commands_pre =
poetry install --with docs
commands =
sphinx-apidoc -o docs/sources cookiecutter_py/
sphinx-build -E -b linkcheck -d "{envtmpdir}{/}doctree" docs "{toxworkdir}{/}docs_out" --color -b html
sphinx-build -E -b html -d "{envtmpdir}{/}doctree" docs "{toxworkdir}{/}docs_out" --color -b html
python -c 'print(r"documentation available under file://{toxworkdir}{/}docs_out{/}index.html")'
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase