forked from Pylons/deform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
106 lines (94 loc) · 2.53 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
[tox]
envlist =
lint,docs,
py35,py36,py37,py38,pypy3,
py3-cover,coverage,
functional3
[testenv]
# Most of these are defaults but if you specify any you can't fall back
# to defaults for others.
basepython =
py35: python3.5
py36: python3.6
py37: python3.7
py38: python3.8
pypy3: pypy3
py3: python3.6
deps = pyramid
usedevelop = true
commands =
python --version
pip install deform[testing]
nosetests --with-xunit --xunit-file=nosetests-{envname}.xml {posargs:}
# we separate coverage into its own testenv because a) "last run wins" wrt
# cobertura jenkins reporting and b) pypy and jython can't handle any
# combination of versions of coverage and nosexcover that i can find.
[py-cover]
commands =
pip install deform[testing]
coverage run --source=deform --omit=deform/[a-z]*_[a-z0-9]*.py {envbindir}/nosetests
coverage xml -o {envname}.xml -i
[testenv:py3-cover]
commands =
{[py-cover]commands}
setenv =
COVERAGE_FILE=.coverage.py3
[testenv:lint]
basepython = python3.6
commands =
flake8 deform setup.py
isort --check-only --df deform setup.py
black --check --diff deform setup.py
python setup.py check -r -s -m
check-manifest
extras =
lint
[testenv:coverage]
basepython = python3.6
commands =
coverage erase
coverage combine
coverage xml -i
coverage report --show-missing --fail-under=100
deps =
coverage
setenv =
COVERAGE_FILE=.coverage
[testenv:docs]
basepython = python3.6
whitelist_externals = make
commands =
pip install deform[docs]
make -C docs html epub BUILDDIR={envdir} "SPHINXOPTS=-W -E -D suppress_warnings=ref.term"
# Selenium tests are slow, run them against one
# interpreter only
[testenv:functional3]
# Allow override test browser
passenv = WEBDRIVER DISPLAY FIREFOX_PATH
basepython = python3.6
commands =
pip install deform[testing,functional]
./run-selenium-tests.bash --with-flaky --max-runs=4 {posargs}
[testenv:format]
skip_install = true
basepython = python3.8
commands =
isort deform setup.py
black deform setup.py
deps =
black
isort
[testenv:build]
skip_install = true
basepython = python3.8
commands =
# clean up build/ and dist/ folders
python -c 'import shutil; shutil.rmtree("dist", ignore_errors=True)'
python setup.py clean --all
# build sdist
python setup.py sdist --dist-dir {toxinidir}/dist
# build wheel from sdist
pip wheel -v --no-deps --no-index --no-build-isolation --wheel-dir {toxinidir}/dist --find-links {toxinidir}/dist deform
deps =
setuptools
wheel