-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
tox.ini
149 lines (123 loc) · 2.96 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
[tox]
envlist =
{py37,py38,py39,py310},
{lint-py37,lint-py38,lint-py39,lint-py310},
coverage-report,
skip_missing_interpreters = True
[travis]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
[testenv]
usedevelop = True
extras =
test
basepython:
py36: python3.6
py37: python3.7
py38: python3.8
py39: python3.8
py310: python3.10
# pypy: pypy
commands =
mkdir -p {toxinidir}/_build/reports/coverage {toxinidir}/_build/reports/pytest
py.test --cov=plonecli --cov-report=xml --html={toxinidir}/_build/reports/pytest/report-{envname}.html --self-contained-html tests {posargs}
setenv =
PYTHONPATH = {toxinidir}
COVERAGE_FILE=.coverage.{envname}
passenv =
VERBOSE
PACKAGENAME
deps =
pip>=9.0.1
setuptools>=33.1.1
pdbpp
pytest
pytest-cov
# pytest-remove-stale-bytecode
pytest-mock
pytest-html
whitelist_externals =
mkdir
[testenv:coverage-report]
usedevelop = True
basepython = python3.9
deps =
coverage
setenv =
COVERAGE_FILE=.coverage
skip_install = true
commands =
coverage erase
coverage combine
coverage report
coverage html
coverage xml
[testenv:isort-apply]
basepython = python3.9
deps =
isort
commands =
isort {toxinidir}/plonecli setup.py tests
[testenv:autopep8]
basepython = python3.9
skip_install = true
deps =
autopep8
docformatter
commands =
autopep8 --verbose --in-place --recursive --aggressive --aggressive {toxinidir}/plonecli setup.py
docformatter --in-place --recursive {toxinidir}/plonecli setup.py
[lint]
skip_install = true
deps =
flake8
# helper to generate HTML reports:
flake8-html
# Useful flake8 plugins that are Python and Plone specific:
isort
flake8-blind-except
flake8-commas
flake8-debugger
flake8-deprecated
flake8-isort
flake8-pep3101
flake8-plone-api
flake8-plone-hasattr
flake8-print
flake8-quotes
flake8-string-format
flake8-todo
commands =
mkdir -p {toxinidir}/_build/reports/flake8
isort --check-only {toxinidir}/plonecli {toxinidir}/tests setup.py
- flake8 --format=html --htmldir={toxinidir}/_build/reports/flake8 --doctests {toxinidir}/plonecli {toxinidir}/tests setup.py
flake8 {toxinidir}/plonecli {toxinidir}/tests setup.py --doctests
whitelist_externals =
mkdir
[testenv:lint-py37]
basepython = python3.7
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
whitelist_externals = {[lint]whitelist_externals}
[testenv:lint-py38]
basepython = python3.8
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
whitelist_externals = {[lint]whitelist_externals}
[testenv:lint-py39]
basepython = python3.9
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
whitelist_externals = {[lint]whitelist_externals}
[testenv:lint-py310]
basepython = python3.10
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
whitelist_externals = {[lint]whitelist_externals}