This repository was archived by the owner on Jan 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathtox.ini
134 lines (129 loc) · 3.56 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
# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
minversion = 3.24.5
envlist =
lint
packaging
py{38,39,310}
py{38,39,310}-{devel}
py{38,39,310}-functional
# do not enable skip missing to avoid CI false positives
skip_missing_interpreters = False
isolated_build = True
[testenv]
description =
Unit testing
usedevelop = True
# download assures tox gets newest pip, see https://github.com/tox-dev/tox/issues/791
download = true
# sitepackages = True
extras = test
deps =
py{38,39,310}: molecule[test]
py{38,39,310}-{devel}: git+https://github.com/ansible-community/molecule.git@main#egg=molecule[test]
commands =
pytest src/molecule_openstack/test/unit --collect-only
pytest src/molecule_openstack/test/unit --color=yes {tty:-s}
setenv =
PIP_DISABLE_PIP_VERSION_CHECK=1
PY_COLORS={env:PY_COLORS:1}
# pip: Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command
PYTHONDONTWRITEBYTECODE=1
# This should pass these args to molecule, no effect here as this is the default
# but it validates that it accepts extra params.
MOLECULE_OPTS=--destroy always
passenv =
CI
CURL_CA_BUNDLE
PYTEST_OPTIONS
REQUESTS_CA_BUNDLE
SSH_AUTH_SOCK
SSL_CERT_FILE
TOXENV
TWINE_*
allowlist_externals =
bash
twine
pytest
pre-commit
[testenv:py{38,39,310}-functional]
description =
Functional testing, require access to openstack cluster
usedevelop = True
# download assures tox gets newest pip, see https://github.com/tox-dev/tox/issues/791
download = true
# sitepackages = True
extras = test
deps =
molecule[test]
ansible-base >=2.10.0
ansible >= 2.10.0
openstacksdk >= 0.50.0
commands =
pytest src/molecule_openstack/test/functional --collect-only
pytest src/molecule_openstack/test/functional --color=yes {tty:-s}
setenv =
ANSIBLE_FORCE_COLOR={env:ANSIBLE_FORCE_COLOR:1}
ANSIBLE_INVENTORY={toxinidir}/tests/hosts.ini
ANSIBLE_CONFIG={toxinidir}/ansible.cfg
ANSIBLE_NOCOWS=1
ANSIBLE_RETRY_FILES_ENABLED=0
ANSIBLE_STDOUT_CALLBACK={env:ANSIBLE_STDOUT_CALLBACK:debug}
ANSIBLE_VERBOSITY={env:ANSIBLE_VERBOSITY:0}
MOLECULE_NO_LOG={env:MOLECULE_NO_LOG:0}
PIP_DISABLE_PIP_VERSION_CHECK=1
PY_COLORS={env:PY_COLORS:1}
# pip: Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command
PYTHONDONTWRITEBYTECODE=1
# This should pass these args to molecule, no effect here as this is the default
# but it validates that it accepts extra params.
MOLECULE_OPTS=--destroy always
passenv =
CI
CURL_CA_BUNDLE
DOCKER_*
PYTEST_OPTIONS
REQUESTS_CA_BUNDLE
SSH_AUTH_SOCK
SSL_CERT_FILE
TOXENV
TRAVIS
TRAVIS_*
TWINE_*
MOLECULE_*
OS_*
allowlist_externals =
bash
twine
pytest
pre-commit
[testenv:packaging]
description =
Build package, verify metadata, install package and assert behavior when ansible is missing.
usedevelop = false
skip_install = true
deps =
collective.checkdocs >= 0.2
pip >= 22.0
build >= 0.7.0, < 0.8.0
pip >= 22.0
twine
commands =
rm -rfv {toxinidir}/dist/
python -m build \
--outdir {toxinidir}/dist/ \
{toxinidir}
# metadata validation
twine check --strict {toxinidir}/dist/*
allowlist_externals =
rm
[testenv:lint]
description = Performs linting, style checks
skip_install = true
sitepackages = false
deps =
pre-commit
commands =
pre-commit run -a