-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
210 lines (175 loc) · 4.71 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
[tox]
# support python2.7
requires = virtualenv<20.22.0
# old tox needs spaces in multi factors
# https://github.com/tox-dev/tox/issues/899
# we also have unlisted environments: black-enforce isort-apply
envlist =
black-check,
py{38, 39, 310, 311, 312, 313}-lint,
py{310, 311, 312, 313}-Plone{61},
py{39, 310, 311, 312}-Plone{60},
# py27 tests are ignored on Github, but active when run locally
py{27, 38}-Plone{52},
# NB Plone43 tests provide their own built-in DX/AT test matrix
py{27}-Plone{43},
coverage-report,
skip_missing_interpreters = True
[gh-actions]
python =
'2.7': py27
'3.8': py38
'3.9': py39
'3.10': py310
'3.11': py311
'3.12': py312
'3.13': py313
[gh-actions:env]
PLONE_VERSION =
Plone43: Plone43
Plone52: Plone52
Plone60: Plone60
Plone61: Plone61
PLATFORM =
lint: lint
[testenv]
skip_install = true
extras =
develop
test
commands =
{envbindir}/buildout -q -c {toxinidir}/{env:version_file} buildout:directory={envdir} buildout:develop={toxinidir} bootstrap
# {envbindir}/buildout -c {toxinidir}/{env:version_file} buildout:directory={envdir} buildout:develop={toxinidir} annotate
{envbindir}/buildout -n -qq -c {toxinidir}/{env:version_file} buildout:directory={envdir} buildout:develop={toxinidir} install test
coverage run {envbindir}/test -v1 --auto-color {posargs}
coverage report -m
setenv =
COVERAGE_FILE={toxinidir}/.coverage.{envname}
PYTHONWARNINGS=default,ignore::DeprecationWarning
Plone43: version_file=test_plone43.cfg
Plone52: version_file=test_plone52.cfg
Plone60: version_file=test_plone60.cfg
Plone61: version_file=test_plone61.cfg
deps =
Plone43: -rrequirements_plone43.txt
Plone52: -rrequirements_plone52.txt
Plone60: -rrequirements_plone60.txt
Plone61: -rrequirements_plone61.txt
coverage
py27: -cconstraints_py27.txt
[testenv:coverage-report]
skip_install = true
usedevelop = True
parallel_show_output = True
basepython = python3.12
depends = py{27, 38, 39, 310, 311, 312, 313}-Plone{43, 52, 60, 61}
deps =
coverage
setenv =
COVERAGE_FILE=.coverage
commands =
coverage erase
coverage combine
coverage report -m
[lint]
skip_install = true
deps =
py{27, 38}: -cconstraints_plone52.txt
py{39}: -cconstraints_plone60.txt
py{310, 311, 312, 313}: -cconstraints_plone61.txt
isort
flake8
# helper to generate HTML reports:
# flake8-html>=0.4.3
# Useful flake8 plugins that are Python and Plone specific:
flake8-coding
flake8-debugger
flake8-deprecated
flake8-print
#flake8-pytest
flake8-todo
mccabe
# Potential flake8 plugins that should be used: # TBD
#flake8-blind-except
#flake8-commas
#flake8-docstrings
#flake8-mypy
#flake8-pep3101
#flake8-plone-hasattr
#flake8-string-format
#flake8_strict
#flake8-quotes
#flake8-polyfill
commands =
mkdir -p {toxinidir}/reports/flake8
flake8 --ignore=E402 {toxinidir}/src {toxinidir}/setup.py
!py27: isort --check-only {toxinidir}/src {toxinidir}/setup.py
allowlist_externals =
mkdir
isort
[testenv:isort-apply]
basepython = python3.12
skip_install = true
deps =
-cconstraints_plone61.txt
isort
commands =
isort {toxinidir}/src {toxinidir}/setup.py
[testenv:black-check]
basepython = python3.12
skip_install = True
deps =
-cconstraints_plone61.txt
black
commands =
black --check --diff -v src setup.py
[testenv:black-enforce]
basepython = python3.12
skip_install = True
deps =
-cconstraints_plone61.txt
black
commands =
black -v src setup.py
[testenv:py27-lint]
basepython = python2.7
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
allowlist_externals = {[lint]allowlist_externals}
[testenv:py38-lint]
basepython = python3.8
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
allowlist_externals = {[lint]allowlist_externals}
[testenv:py39-lint]
basepython = python3.9
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
allowlist_externals = {[lint]allowlist_externals}
[testenv:py310-lint]
basepython = python3.10
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
allowlist_externals = {[lint]allowlist_externals}
[testenv:py311-lint]
basepython = python3.11
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
allowlist_externals = {[lint]allowlist_externals}
[testenv:py312-lint]
basepython = python3.12
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
allowlist_externals = {[lint]allowlist_externals}
[testenv:py313-lint]
basepython = python3.13
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
allowlist_externals = {[lint]allowlist_externals}