This repository was archived by the owner on Jan 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
98 lines (94 loc) · 2.68 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
# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
minversion = 3.20.1
envlist =
lint
packaging
py
py-{devel}
skipsdist = True
isolated_build = True
[testenv]
description =
Unit testing
# both options needed to workaround https://github.com/tox-dev/tox/issues/2197
usedevelop = False
skip_install = True
# download assures tox gets newest pip, see https://github.com/tox-dev/tox/issues/791
download = true
deps =
--editable .[docker,podman]
# git+https://github.com/ansible/ansible.git#egg=ansible
# do not make ansible a runtime dependency, keep it specific to tox
ansible-core >= 2.11
ansible-lint
# https://github.com/ansible-community/molecule-containers/pull/32
filelock
!devel: molecule[test] >= 3.6.0
devel: git+https://github.com/ansible-community/molecule#egg=molecule[test]
devel: git+https://github.com/ansible-community/molecule-docker#egg=molecule-docker
devel: git+https://github.com/ansible-community/molecule-podman#egg=molecule-podman
commands =
pip check
# TODO: investigate why we need to do this:
ansible-galaxy collection install containers.podman
ansible-galaxy collection install ansible.posix
pytest --collect-only
pytest --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_VERBOSITY={env:ANSIBLE_VERBOSITY:0}
PIP_DISABLE_PIP_VERSION_CHECK=1
PY_COLORS={env:PY_COLORS:1}
PRE_COMMIT_COLOR=always
# 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_*
HOME
PYTEST_*
REQUESTS_CA_BUNDLE
SSH_AUTH_SOCK
SSL_CERT_FILE
TOXENV
TRAVIS
TRAVIS_*
TWINE_*
ZUUL*
whitelist_externals =
bash
twine
pytest
pre-commit
sh
[testenv:packaging]
usedevelop = false
skip_install = true
deps =
build >= 0.5.1
twine >= 3.4.2
commands =
bash -c "rm -rf {toxinidir}/dist/ && mkdir -p {toxinidir}/dist/"
python -m build \
--outdir {toxinidir}/dist/ \
{toxinidir}
# metadata validation
sh -c "python -m twine check {toxinidir}/dist/*"
[testenv:lint]
description = Performs linting, style checks
skip_install = true
sitepackages = false
deps =
pre-commit
commands =
pre-commit run -a