-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtox.ini
87 lines (81 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
[tox]
minversion = 3.4.0
envlist = linters,molecule
skipsdist = True
ignore_basepython_conflict = True
# NOTE: Avoid false positives by not skipping missing interpreters.
skip_missing_interpreters = False
[testenv]
setenv =
ANSIBLE_FORCE_COLOR=1
ANSIBLE_INVENTORY={toxinidir}/test/hosts.ini
ANSIBLE_NOCOWS=1
ANSIBLE_RETRY_FILES_ENABLED=0
ANSIBLE_STDOUT_CALLBACK=debug
MOLECULE_NO_LOG={env:MOLECULE_NO_LOG:0}
PY_COLORS=1
VIRTUAL_ENV={envdir}
# Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command
PIP_DISABLE_PIP_VERSION_CHECK=1
passenv =
ANSIBLE_*
CURL_CA_BUNDLE
DOCKER_*
MOLECULE_*
REQUESTS_CA_BUNDLE
SSH_AUTH_SOCK
SSL_CERT_FILE
TERM
[testenv:deps]
description = Bump all test dependencies
basepython = python3
deps =
pre-commit>=2.6.0
pip-tools>=5.4.0
setuptools>=51.1.1
skip_install = true
commands =
pip-compile --upgrade --output-file=test-requirements.txt test-requirements.in
# https://github.com/jazzband/pip-tools/issues/1300#issuecomment-818122483
sed -i.bak 's/\[.*\]//g' test-requirements.txt
pre-commit autoupdate
allowlist_externals =
sed
[testenv:linters]
allowlist_externals =
bash
{toxinidir}/tools/zuul-projects-checks.py
deps =
# workaround for https://github.com/ansible/ansible-lint/issues/590
virtualenv>=20.0.31
pre-commit>=2.7.1
commands =
# Run some policy checks on zuul.d/projects.yaml
{toxinidir}/tools/zuul-projects-checks.py
python -m pre_commit run -a
[testenv:venv]
commands = {posargs}
[testenv:molecule]
download = true
deps =
-ctest-requirements.txt
ansible
molecule[docker,podman,test]
pytest-molecule
jmespath
commands =
ansible-galaxy collection install community.docker
python -m pytest -ra --html={envlogdir}/reports.html --self-contained-html {tty:-s} {posargs:-k molecule} roles
# python -m pytest -ra {tty:-s} --html={envlogdir}/reports.html --self-contained-html --continue-on-collection-errors --ignore=roles -k molecule -m "not delegated" {posargs}
[testenv:molecule-rhel8]
envdir = {toxworkdir}/molecule
setenv =
{[testenv]setenv}
MOLECULE_PLATFORM=rhel8
MOLECULE_IMAGE=rhel/rhel8-rhui-testing:latest
MOLECULE_CONTAINER_REGISTRY_URL=trunk.registry.rdoproject.org
deps =
{[testenv:molecule]deps}
commands =
{[testenv:molecule]commands}