Skip to content

Commit 8c5ed2a

Browse files
tox.ini: reorganize tox config for more granular env selection
Break the tox configuration up so that the formatting, mypy, and pytest runs occur in their own environments. Futher, allow py39 based envs to operate with fewer dependencies so that we still ensure we work on py39 but the "fully featured" test run occurs on whatever the "native" py3 version is. Signed-off-by: John Mulligan <[email protected]>
1 parent b48c063 commit 8c5ed2a

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

tox.ini

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
[tox]
3-
envlist = py39, py3
3+
envlist = formatting, {py3,py39}-mypy, py3, py39
44
isolated_build = True
55

66
[testenv]
@@ -11,14 +11,24 @@ passenv =
1111
deps =
1212
pytest
1313
pytest-cov
14-
flake8
1514
mypy
16-
inotify_simple
17-
black>=21.8b0
1815
dnspython
19-
pyxattr
16+
py3: inotify_simple
17+
py3: pyxattr
18+
commands =
19+
py.test -v tests --cov=sambacc --cov-report=html {posargs}
20+
21+
[testenv:{py3,py39}-mypy]
22+
deps =
23+
mypy
24+
{[testenv]deps}
25+
commands =
26+
mypy sambacc tests
27+
28+
[testenv:formatting]
29+
deps =
30+
flake8
31+
black>=21.8b0
2032
commands =
2133
flake8 sambacc tests
2234
black --check -v .
23-
mypy sambacc tests
24-
py.test -v tests --cov=sambacc --cov-report=html {posargs}

0 commit comments

Comments
 (0)