forked from ansible-community/molecule-vmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
67 lines (59 loc) · 1.55 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
[tox]
minversion = 3.9.0
envlist =
py{36,37,38,39}-lint
py{36,37,38,39}-gen-role
py{36,37,38,39}-gen-scenario
packaging
skipsdist = True
[variables]
validate_playbooks = create.yml destroy.yml verify.yml
[testenv]
install_command = pip install {opts} {packages}
deps =
flake8
whitelist_externals =
bash
[testenv:py{36,37,38,39}-lint]
commands =
flake8 {toxinidir}/molecule_vmware {posargs}
[testenv:py{36,37,38,39}-gen-role]
deps =
molecule[test]
ansible >= 2.10
ansible-lint == 4.3.7
yamllint
commands =
pip install .
molecule init role {toxinidir}/test -d vmware
bash -c "cd {toxinidir}/test && yamllint ./molecule/**/*.yml"
bash -c "cd {toxinidir}/test && for f in {[variables]validate_playbooks} ; do ansible-lint {toxinidir}/test/molecule/**/$f --exclude meta/ ; done"
[testenv:py{36,37,38,39}-gen-scenario]
deps =
molecule[test]
ansible >= 2.10
ansible-lint == 4.3.7
yamllint
commands =
pip install .
molecule init scenario -d vmware
bash -c "yamllint {toxinidir}/molecule/**/*.yml"
bash -c "for f in {[variables]validate_playbooks} ; do ansible-lint {toxinidir}/molecule/**/$f ; done"
[testenv:packaging]
deps =
collective.checkdocs >= 0.2
pep517 >= 0.5.0
twine >= 2.0.0
commands =
bash -c "rm -rf {toxinidir}/dist/ && mkdir -p {toxinidir}/dist/"
python -m pep517.build \
--source \
--binary \
--out-dir {toxinidir}/dist/ \
{toxinidir}
twine check dist/*
[flake8]
show-source = True
max-line-length = 160
builtins = _
exclude = .git,.tox