-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
49 lines (46 loc) · 1.34 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
[tox]
description = Default environments to be executed when calling tox
envlist =
style
{py39,py310,py311,py312}{,-keep-output}{,-python}
doc
isolated_build = true
isolated_build_env = build
[testenv]
description = Generic environment configuration
basepython =
py39: python3.9
py310: python3.10
py311: python3.11
py312: python3.12
py: python3
{style,doc,build}: python3
passenv = *
setenv =
PYTHONUNBUFFERED = yes
smoke: PYTEST_MARKERS = -k "not tests_templates"
python: PYTEST_MARKERS = -k "tests_templates_python"
template: PYTEST_MARKERS = -k "{env:TEMPLATE:}"
keep-output: PYTEST_EXTRA_ARGS = --basetemp=output
cov: PYTEST_EXTRA_ARGS = --cov=ansys.templates --cov-report=term --cov-report=xml:.cov/xml --cov-report=html:.cov/html
skip_install = false
extras =
tests
commands =
pytest {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {posargs: tests -vvv}
[testenv:style]
description = Checks if code style applies
skip_install = true
deps =
pre-commit
commands =
pre-commit install
pre-commit run --all-files --show-diff-on-failure
[testenv:doc]
description = Checks if project documentation properly builds
skip_install = false
extras =
doc
allowlist_externals=*
commands =
sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxinidir}/doc/_build/html" --color -vW -bhtml