forked from devjatkin/stackforce-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
40 lines (34 loc) · 1.02 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
[tox]
skipsdist = True
envlist = pep8, ansible-lint, unittest
[testenv]
deps = -r{toxinidir}/test/requirements.txt
setenv = VIRTUAL_ENV={envdir}
usedevelop = False
[testenv:ansible-lint]
whitelist_externals = bash
commands =
bash -c "ansible-playbook --syntax-check --list-tasks -i {toxinidir}/inventory/localhost {toxinidir}/playbooks/*.yml"
bash -c "ansible-lint --version"
bash -c "ansible-lint {toxinidir}/playbooks/*.yml --exclude {toxinidir}/playbooks/roles/mysql/"
[testenv:unittest]
commands =
py.test
[testenv:smoketest]
commands =
py.test test/smoke
[testenv:pep8]
deps = flake8
whitelist_externals = bash
commands = flake8
[flake8]
# Ignores the following rules due to how ansible modules work in general
# F403 'from ansible.module_utils.basic import *' used;
# unable to detect undefined names
# H303 No wildcard (*) import.
exclude = .vagrant, .venv, .git, .tox, dist, doc, *egg, build,
ignore=F403,H303,H802,H803,W503
show-pep8 = True
show-source = True
count = True
builtins = _