-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
77 lines (64 loc) · 1.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
[tox]
minversion = 3.1
envlist = py37,py38,pep8,molecule-ansible{29,210},linters{,-29}
skipsdist = True
[testenv]
install_command = pip install {opts} {packages}
deps =
-r{toxinidir}/playbooks/files/requirements.txt
[testenv:pep8]
commands =
flake8 --max-complexity 8 --statistics
deps =
-r{toxinidir}/lint-requirements.txt
[testenv:linters{,-29}]
basepython = python38
ignore_errors = true
allowlist_externals = {toxinidir}/scripts/ansible-lint.sh
deps =
ansible-lint>=4.3,<5
29: ansible>=2.9,<2.10
yamllint==1.25.0
rich>=9.5.1,<11.0.0
commands_pre =
ansible-galaxy install -r {toxinidir}/requirements.yaml
commands =
yamllint . -f parsable
{toxinidir}/scripts/ansible-lint.sh
[testenv:functional]
ignore_errors = true
deps =
{[testenv]deps}
-r{toxinidir}/test-requirements.txt
passenv = OS_CLOUD OS_CLIENT_CONFIG_FILE
setenv =
CSM_ACC = 1
commands_pre =
ansible-galaxy install -r {toxinidir}/requirements.yaml
commands =
python -m unittest discover tests.acceptance
[flake8]
ignore = I201, I100
max-line-length = 99
[testenv:tflint]
deps =
setenv =
PATH = {env:PATH}{:}{toxinidir}
TF_VERSION = 0.14.3
commands_pre =
/usr/bin/bash {toxinidir}/scripts/prepare-terraform.sh {env:TF_VERSION} {toxinidir}
commands =
/usr/bin/bash {toxinidir}/scripts/terraform-lint.sh
[testenv:molecule-ansible{29,210}]
basepython = python38
setenv =
TF_VERSION = 0.14.2
allowlist_externals = {toxinidir}/scripts/molecule.sh
deps =
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/lint-requirements.txt
molecule[docker]
ansible29: ansible>=2.9,<2.10
ansible210: ansible>=2.10,<2.11
commands =
{toxinidir}/scripts/molecule.sh