-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
167 lines (139 loc) · 3.67 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
[tox]
envlist =
py{27,34,35,36,py}-packagetests,
py{27}-skeletontests-Plone-{4.3,5.0,5.1}-template-test_cs_plone_buildout
lint-py27,
lint-py35,
lint-py36,
docs,
coverage-report,
skip_missing_interpreters = True
[testenv]
usedevelop = True
extras =
test
basepython:
py27: python2.7
py34: python3.4
py35: python3.5
py36: python3.6
pypy: pypy
commands =
mkdir -p {toxinidir}/_build/reports/coverage {toxinidir}/_build/reports/pytest
packagetests: pytest --cov=bobtemplates.cs --cov-report=xml --html={toxinidir}/_build/reports/pytest/report-{envname}.html --self-contained-html package-tests {posargs}
template-buildout: pytest skeleton-tests/test_cs_plone_buildout.py {posargs}
template-migration: pytest skeleton-tests/test_cs_migration.py {posargs}
setenv =
COVERAGE_FILE=.coverage.{envname}
Plone-4.3: VERSION=4.3-latest
Plone-5.0: VERSION=5.0-latest
Plone-5.1: VERSION=5.1-latest
passenv =
VERBOSE
PACKAGENAME
deps =
-cconstraints.txt
pdbpp
pytest
pytest-cov
pytest-remove-stale-bytecode
pytest-mock
pytest-html
whitelist_externals =
mkdir
[testenv:coverage-report]
basepython = python2.7
deps =
-cconstraints.txt
coverage
setenv =
COVERAGE_FILE=.coverage
skip_install = true
commands =
coverage erase
coverage combine
coverage report
coverage html
coverage xml
[testenv:isort-apply]
basepython = python2.7
deps =
-cconstraints.txt
isort
commands =
isort --apply --recursive {toxinidir}/bobtemplates setup.py
[testenv:autopep8]
basepython = python2.7
skip_install = true
deps =
-cconstraints.txt
autopep8
docformatter
commands =
autopep8 --verbose --in-place --recursive --aggressive --aggressive {toxinidir}/bobtemplates setup.py
docformatter --in-place --recursive {toxinidir}/bobtemplates setup.py
[lint]
skip_install = true
deps =
-cconstraints.txt
flake8
# helper to generate HTML reports:
flake8-html
# Useful flake8 plugins that are Python and Plone specific:
isort
flake8-blind-except
flake8-coding
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
flake8_strict
commands =
mkdir -p {toxinidir}/_build/reports/flake8
isort --check-only --recursive {toxinidir}/bobtemplates {toxinidir}/package-tests {toxinidir}/skeleton-tests setup.py
- flake8 --format=html --htmldir={toxinidir}/_build/reports/flake8 --doctests {toxinidir}/bobtemplates {toxinidir}/package-tests {toxinidir}/skeleton-tests setup.py
flake8 {toxinidir}/bobtemplates {toxinidir}/package-tests {toxinidir}/skeleton-tests setup.py --doctests
whitelist_externals =
mkdir
[testenv:lint-py27]
basepython = python2.7
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
whitelist_externals = {[lint]whitelist_externals}
[testenv:lint-py35]
basepython = python3.5
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
whitelist_externals = {[lint]whitelist_externals}
[testenv:lint-py36]
basepython = python3.6
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
whitelist_externals = {[lint]whitelist_externals}
[testenv:docs]
basepython = python2.7
commands =
sphinx-build -b html -d _build/docs/doctrees docs _build/docs/html
# sphinx-build -b doctest docs _build/docs/doctrees
deps =
-cconstraints.txt
Sphinx
[testenv:release]
skip_install = true
basepython = python2.7
deps =
-cconstraints.txt
zest.releaser[recommended]
commands =
python -V
fullrelease --no-input -v