forked from pycontribs/mk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
94 lines (89 loc) · 2.16 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
[tox]
envlist =
lint
packaging
py
minversion = 3.23.0
isolated_build = true
skip_missing_interpreters = false
requires =
tox-extra
[testenv]
description = run the tests with pytest under {basepython}
setenv =
PIP_CONSTRAINT = {toxinidir}/.config/requirements.txt
PIP_DISABLE_PIP_VERSION_CHECK = 1
VIRTUALENV_NO_DOWNLOAD = 1
PYTEST_REQPASS = 7
passenv =
HOME
PYTEST_*
PYTHONHTTPSVERIFY
REQUESTS_CA_BUNDLE
SSL_CERT_FILE
TERM
http_proxy
https_proxy
no_proxy
allowlist_externals =
bash
rm
sh
commands =
pytest {tty:--color=yes}
deps =
-e .[test]
[testenv:deps]
description = Update dependency lock files
# Force it to use oldest supported version of python or we would lose ability
# to get pinning correctly.
basepython = python3.8
deps =
pip-tools >= 6.12.3
setenv =
PIP_CONSTRAINT=
commands =
pip-compile --upgrade --resolver=backtracking --no-annotate --strip-extras --output-file=.config/requirements.txt --extra test setup.cfg
[testenv:lint]
passenv = {[testenv]passenv}
# without PROGRAMDATA cloning using git for Windows will fail with an
# `error setting certificate verify locations` error
PROGRAMDATA
extras = lint
deps =
pre-commit >= 2.4.0
# `usedevelop = true` overrides `skip_install` instruction, it's unwanted
usedevelop = false
# don't install package itself in this env
skip_install = true
setenv =
PIP_CONSTRAINT=
commands =
python -m pre_commit run {tty:--color=always} --all-files --show-diff-on-failure
[testenv:integration]
description = Run integrations tests
setenv =
ANSIBLE_NOCOWS=1
ANSIBLE_FORCE_COLOR=1
deps =
-e .[test]
ansible-core>=2.12
commands =
mk test-integration
[testenv:packaging]
description =
Do packaging/distribution. If tag is not present or PEP440 compliant upload to
PYPI could fail
deps =
collective.checkdocs >= 0.2
build >= 0.3.1.post1
twine >= 1.14.0
commands =
rm -rfv {toxinidir}/dist/
python -m build \
--sdist \
--wheel \
--outdir {toxinidir}/dist/ \
{toxinidir}
# metadata validation
python -m twine check --strict {toxinidir}/dist/*