-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
75 lines (72 loc) · 2.31 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
[tox]
minversion = 4.0.0
envlist =
lint
docs
py-ansible{2.15, 2.16, 2.17}-{default,ssh}
py-ansible{2.16, 2.17}-{default,ssh}-{centos, debian}
py-ansible{2.17}-{multi}
[testenv]
description =
default-!centos-!debian: Run molecule scenario on Ubuntu (default)
ssh-!centos-!debian: Run molecule scenario on Ubuntu (step_ssh)
centos-!ssh: Run molecule scenario on CentOS (default)
centos-!default: Run molecule scenario on CentOS (step_ssh)
debian-!ssh: Run molecule scenario on Debian (default)
debian-!default: Run molecule scenario on Debian (default)
multi: Run molecule scenario to request multiple server certs (Ubuntu)
deps =
ansible2.15: ansible-core == 2.15.*
ansible2.16: ansible-core == 2.16.*
ansible2.17: ansible-core == 2.17.*
docker
jmespath
molecule
molecule-plugins[docker]
pytest
pytest-testinfra
commands =
default: molecule {posargs:test -s default}
ssh: molecule {posargs:test -s step_ssh}
multi: molecule {posargs:test -s multiple_certs}
setenv =
ANSIBLE_COLLECTIONS_PATH={work_dir}/{env_name}/.ansible/collections/ansible_collections
MOLECULE_EPHEMERAL_DIRECTORY={work_dir}/{env_name}/.cache/molecule
MOLECULE_GLOB=./extensions/molecule/*/molecule.yml
MOLECULE_NAME={env_name}
centos: MOLECULE_IMAGE=trfore/docker-centos9-systemd
debian: MOLECULE_IMAGE=trfore/docker-debian12-systemd
PY_COLORS=1
TOX_ENVNAME={env_name}
passenv =
DOCKER_HOST
MOLECULE_IMAGE
STEP_CA_VERSION
STEP_CLI_VERSION
[testenv:docs]
description = Build the docsite for local preview
deps =
ansible-core
antsibull-docs
allowlist_externals = bash, chmod
commands_pre =
ansible-galaxy collection install . --force
chmod 0700 {env:DOCS_PATH}
commands =
antsibull-docs sphinx-init --squash-hierarchy --use-current --dest-dir {env:DOCS_PATH} trfore.smallstep
pip install -r {env:DOCS_PATH}/requirements.txt
bash {env:DOCS_PATH}/build.sh
setenv =
ANSIBLE_COLLECTIONS_PATH={work_dir}/{env_name}/.ansible/collections/ansible_collections
DOCS_PATH={env_dir}/tmp
PY_COLORS=1
TOX_ENVNAME={env_name}
[testenv:lint]
description = Run all linting tasks
skip_install = true
deps =
pre-commit
commands =
pre-commit run {posargs:--all --show-diff-on-failure}
setenv =
TOX_ENVNAME={env_name}