forked from ansible/ansible-lint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
99 lines (92 loc) · 2.37 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
[tox]
minversion = 3.5.3
envlist = lint,py{38,37,36,35,27}-ansible{29,28,27,devel}
isolated_build = true
requires =
setuptools >= 41.4.0
pip >= 19.3.0
skip_missing_interpreters = True
# `usedevelop = true` overrides `skip_install` instruction, it's unwanted
usedevelop = false
[testenv]
deps =
ansible27: ansible>=2.7,<2.8
ansible28: ansible>=2.8,<2.9
ansible29: ansible>=2.9,<2.10
ansibledevel: git+https://github.com/ansible/ansible.git
ruamel.yaml==0.16.5 # NOTE: 0.15.34 has issues with py37
flake8
pep8-naming
pytest
pytest-cov
pytest-xdist
# Needed to avoid DeprecationWarning errors in pytest:
setuptools >= 40.4.3
wheel
commands =
{envpython} -m pytest {posargs:}
passenv =
CURL_CA_BUNDLE # https proxies, https://github.com/tox-dev/tox/issues/1437
HOME
REQUESTS_CA_BUNDLE # https proxies
SSL_CERT_FILE # https proxies
# recreate = True
[testenv:.dev-env]
#basepython = python3
basepython = /home/wk/.pyenv/versions/ansible-lint-py3.8.0-pyenv-venv/bin/python3
#{[testenv]deps}
deps =
# virtualenv >= 16
# setuptools >= 45.0.0
isolated_build = false
skip_install = true
recreate = false
usedevelop = false
[testenv:build-dists]
description =
Build dists with PEP 517 and save them in the dist/ dir
basepython = python3
skip_install = true
passenv =
{[testenv]passenv}
PYPI_UPLOAD
deps =
pep517 >= 0.5.0
commands =
{envpython} -c 'import os.path, shutil, sys; \
dist_dir = os.path.join("{toxinidir}", "dist"); \
os.path.isdir(dist_dir) or sys.exit(0); \
print("Removing \{!s\} contents...".format(dist_dir), file=sys.stderr); \
shutil.rmtree(dist_dir)'
{envpython} -m pep517.build \
--source \
--binary \
--out-dir {toxinidir}/dist/ \
{toxinidir}
# deprecated: use more generic 'lint' instead
[testenv:flake8]
deps = {[testenv:lint]deps}
envdir = {toxworkdir}/lint
skip_install = true
commands =
python -m pre_commit run --all-files flake8
[testenv:lint]
deps =
pre-commit>=1.20.0
skip_install = true
commands =
python -m pre_commit run {posargs:--all-files}
[testenv:docs]
whitelist_externals = make
deps = sphinx
commands = make -C docs/docsite htmldocs
[testenv:metadata-validation]
description =
Verify that dists under the dist/ dir have valid metadata
depends = build-dists
deps =
twine
skip_install = true
# Ref: https://twitter.com/di_codes/status/1044358639081975813
commands =
twine check {toxinidir}/dist/*