-
Notifications
You must be signed in to change notification settings - Fork 8
/
tox.ini
82 lines (74 loc) · 2.2 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
72
73
74
75
76
77
78
79
80
81
82
[tox]
envlist = {py35,py36,py37,py38,py39}-{test,rapidjson},lint,flake8,check_package,black
skip_missing_interpreters = true
[testenv]
passenv = APPBASE
setenv =
APPBASE = {toxinidir}/riotctrl/tests/utils
package = riotctrl
deps =
test: {[testenv:test]deps}
rapidjson: {[testenv:rapidjson]deps}
lint: {[testenv:lint]deps}
flake8: {[testenv:flake8]deps}
black: {[testenv:black]deps}
check_package: {[testenv:check_package]deps}
commands =
test: {[testenv:test]commands}
rapidjson: {[testenv:rapidjson]commands}
lint: {[testenv:lint]commands}
flake8: {[testenv:flake8]commands}
black: {[testenv:black]commands}
check_package: {[testenv:check_package]commands}
[testenv:test]
deps =
pytest
pytest-cov
commands =
pytest -m "not rapidjson" {posargs}
[testenv:rapidjson]
deps =
pytest
pytest-cov
.[rapidjson]
commands =
pytest -m "rapidjson" {posargs}
[testenv:lint]
deps =
pylint
pytest
commands =
pylint --rcfile=setup.cfg {envsitepackagesdir}/{env:package}
# This does not check files in 'tests/utils/application'
[testenv:{build,clean}]
description =
build: Build the package in isolation according to PEP517, see https://github.com/pypa/build
clean: Remove old distribution files and temporary build artifacts (./build and ./dist)
# https://setuptools.pypa.io/en/stable/build_meta.html#how-to-use-it
skip_install = True
changedir = {toxinidir}
deps =
build: build[virtualenv]
passenv =
SETUPTOOLS_*
commands =
clean: python -c 'import shutil; [shutil.rmtree(p, True) for p in ("build", "dist", "docs/_build")]'
clean: python -c 'import pathlib, shutil; [shutil.rmtree(p, True) for p in pathlib.Path("src").glob("*.egg-info")]'
build: python -m build {posargs}
# By default, both `sdist` and `wheel` are built. If your sdist is too big or you don't want
# to make it available, consider running: `tox -e build -- --wheel`
[testenv:check_package]
changedir = {toxinidir}
skip_install = True
deps =
twine
commands =
python -m twine check dist/*
[testenv:flake8]
deps = flake8
commands =
flake8
[testenv:black]
deps = black
commands =
black --check --diff .