-
Notifications
You must be signed in to change notification settings - Fork 162
/
tox.ini
92 lines (82 loc) · 2 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
[tox]
envlist =
lint,docs,
py38,py39,py310,py311,py312,pypy3,
py311cover,coverage,
functional3
[testenv]
extras =
testing
setenv =
COVERAGE_FILE=.coverage.{envname}
commands =
python --version
pytest {posargs:}
[testenv:py311-cover]
commands =
python --version
pytest --cov {posargs:}
[testenv:lint]
commands =
python --version
pip freeze
flake8 deform setup.py
isort --check-only --df deform setup.py
black --check --diff deform setup.py
# XXX -r reports now warnings too so we fail
python setup.py check -s -m
rstcheck README.rst CHANGES.txt
check-manifest
extras =
lint
[testenv:coverage]
skip_install = true
commands =
coverage combine
coverage xml
coverage report --show-missing --fail-under=100
deps =
coverage
setenv =
COVERAGE_FILE=.coverage
depends = py311-cover
[testenv:docs]
allowlist_externals = make
commands =
pip install deform[docs]
python --version
pip freeze
make -C docs html epub BUILDDIR={envdir} "SPHINXOPTS=-W -E"
# Selenium tests are slow. Run them against only one interpreter.
[testenv:functional3]
# Allow override test browser
passenv = DISPLAY, WEBDRIVER, FIREFOX_PATH, URL, WAITTOSTART, CONTAINERTZ
allowlist_externals = ./run-selenium-tests.bash
commands =
pip install deform[testing,functional]
python --version
pip freeze
./run-selenium-tests.bash --max-runs=4 {posargs}
deps =
docker
[testenv:format]
skip_install = true
commands =
isort deform setup.py
black deform setup.py
deps =
black
isort
[testenv:build]
skip_install = true
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