-
Notifications
You must be signed in to change notification settings - Fork 11
/
tox.ini
114 lines (104 loc) · 2.51 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# tox (https://tox.readthedocs.io/) 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]
minversion = 3.10
envlist =
style
tests_start
py{39,38,37,36}
pytests_merge
coverage_report
skip_missing_interpreters = True
isolated_build = True
usedevelop = False
download = False
[testenv]
# settings in this category apply to all other testenv, if not overwritten
depends = tests_start
deps =
-r requirements/tests.txt
-c requirements/dev.txt
setenv =
NP_TESTLOG_NAME = {env:NP_TESTLOG_NAME:}_{envname}
extras =
colors
commands =
{envpython} -m pytest \
--cov --cov-append --cov-report='' \
--junit-xml=reports/pytests/{envname}.xml -o junit_suite_name={envname} \
{posargs}
[testenv:tests_start]
depends =
skip_install = True
deps =
coverage
-c requirements/dev.txt
setenv =
NP_TESTLOG_NAME =
commands =
{envpython} -m coverage erase
{envpython} -c 'import shutil; shutil.rmtree("reports", True)'
[testenv:coverage_report]
depends =
tests_start
py{39, 38,37,36}
skip_install = True
deps =
coverage
-c requirements/dev.txt
setenv =
NP_TESTLOG_NAME =
commands =
{envpython} -m coverage xml
{envpython} -m coverage report
[testenv:pytests_merge]
depends =
tests_start
py{39,38,37,36}
skip_install = True
deps =
junitparser
-c requirements/dev.txt
setenv =
NP_TESTLOG_NAME =
commands =
{envpython} -m junitparser merge --glob reports/pytests/*.xml reports/pytests.xml
[testenv:style]
depends =
skip_install = True
deps =
-r requirements/style.txt
-r requirements/tests.txt # to analyse tests
-c requirements/dev.txt
setenv =
NP_TESTLOG_NAME =
commands =
{envpython} -m flake8
{envpython} -m mypy
[testenv:version]
depends =
skip_install = True
deps =
setenv =
commands =
{envpython} bin/test_version.py {env:NP_VERSION_EXPECTED}
[testenv:build]
depends =
skip_install = True
deps = -r requirements/build.txt
setenv =
NP_TESTLOG_NAME =
NP_DIST_DIR = {env:NP_DIST_DIR:dist}
commands =
{envpython} -c 'import shutil; shutil.rmtree("build", True); shutil.rmtree("{env:NP_DIST_DIR}", True)'
{envpython} -m pep517.build --source --binary --out-dir {env:NP_DIST_DIR} .
[testenv:install]
depends = build
skip_install = True
deps =
setenv =
NP_TESTLOG_NAME =
commands =
{envpython} bin/test_install_dists.py {env:NP_DIST_DIR:dist}