This repository has been archived by the owner on Aug 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtox.ini
71 lines (65 loc) · 1.66 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
[tox]
minversion = 3.8.6
envlist =
lint
sanity
functional
skipdist = True
skip_missing_interpreters = True
[travis]
python =
3.7: lint, sanity, functional
[flake8]
max-line-length = 90
max-complexity = 10
[testenv]
usedevelop = False
basepython = python3.7
passenv = *
setenv =
PYTHONDONTWRITEBYTECODE=1
commands_pre =
find {toxinidir} -type f -not -path '{toxinidir}/.tox/*' -path \
'*/__pycache__/*' -path '*/build/*' -name '*.py[c|o]' -delete
whitelist_externals =
find
bash
wget
unzip
rm
# Enabling sitepackages is needed in order to avoid encountering exceptions
# caused by missing selinux python bindinds in ansible modules like template.
# Selinux python bindings are binary and they cannot be installed using pip
# in virtualenvs. Details: https://github.com/ansible/molecule/issues/1724
sitepackages = false
[testenv:lint]
deps =
flake8>=3.6.0,<4
yamllint>=1.11.1,<2
extras =
skip_install = true
usedevelop = false
commands =
flake8 piedpiper-pybandit-function
bash -ec "yamllint $(find . -path ./template -prune -o -path ./tests -prune \
-o -name '*.yml' -print)"
[testenv:sanity]
deps =
pluggy==0.12.0
pytest==4.5.0
PyYAML==5.1
skip_install = true
usedevelop = false
commands_pre =
wget https://github.com/AFCYBER-DREAM/piedpiper-mindflayer/archive/v1.0.0.zip \
-O /tmp/piedpiper-mindflayer.zip
unzip /tmp/piedpiper-mindflayer.zip -d /tmp/
commands =
pytest /tmp/piedpiper-mindflayer-1.0.0/tests/test_stack_yaml.py
commands_post =
rm -rf /tmp/piedpiper-mindflayer*
[testenv:functional]
skip_install = true
usedevelop = false
commands =
bash tests/functional/run-tests.sh