-
Notifications
You must be signed in to change notification settings - Fork 22
/
tox.ini
70 lines (62 loc) · 2.1 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
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = py{,2,27,3,34,35,36,37,38,39,py,py3}-test, flake8, mypy, docs, pkg
skip_missing_interpreters=True
[testenv]
description = Run tests
commands =
test: python --version
test: python -c "import platform; print(platform.architecture())"
test: pytest --junit-xml=junit/{envname}.xml --junit-prefix={envname} {posargs: -m "not integration"}
deps =
-rrequirements_test.txt
[testenv:flake8]
description = Run static analysis
commands =
python --version
python -c "import platform; print(platform.architecture())"
flake8 {posargs}
deps =
-rrequirements_test.txt
[testenv:mypy]
description = Run type analysis
commands =
python --version
python -c "import platform; print(platform.architecture())"
mypy nixnet nixnet_examples tests {posargs}
deps =
-rrequirements_mypy.txt
[testenv:docs]
description = Generate documentation
changedir = docs
commands =
python --version
python -c "import platform; print(platform.architecture())"
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html {posargs}
deps =
-rrequirements_test.txt
[testenv:pkg]
description = Verify the package
commands =
python --version
python -c "import platform; print(platform.architecture())"
python setup.py check -m -r -s
check-manifest --ignore tox*.ini,tests,*.in,.*,.*/*,CONTRIBUTING.rst,MAINTAINING.rst,docs,docs/*,Jenkinsfile
deps =
-rrequirements_test.txt
[flake8]
show_source = true
# We recommend setting your editor's visual guide to 79 but allow overflow to
# 120 for readability in certain cases
max_line_length = 120
exclude = build,docs,.tox,__pycache__
# H903: Windows style line endings not allowed in code
ignore = H903
[pytest]
addopts = --cov nixnet --cov nixnet_examples --cov-report term --cov-report xml --verbose --doctest-modules --ignore=setup.py
[travis]
python =
3.6: py36-test, flake8, mypy, docs, pkg