summaryrefslogtreecommitdiff
path: root/tox.ini
blob: 00eea9d0bd98b614a69de83cc1379ff8e4187000 (plain)
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
[tox]
envlist = pep8,py35,bandit,docs

[testenv]
basepython=python3
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY

[testenv:venv]
commands = {posargs}

[testenv:py35]
setenv =
  PYTHONWARNING=all
deps = -r{toxinidir}/requirements-frozen.txt
       -r{toxinidir}/test-requirements.txt
commands =
    pytest {posargs}

[testenv:py36]
setenv =
  PYTHONWARNING=all
deps = -r{toxinidir}/requirements-frozen.txt
       -r{toxinidir}/test-requirements.txt
commands =
    pytest {posargs}

[testenv:bandit]
deps =
    -r{toxinidir}/test-requirements.txt
commands =
    bandit -r promenade

[testenv:docs]
whitelist_externals = rm
deps =
    -r{toxinidir}/doc/requirements.txt
commands =
    rm -rf doc/build
    sphinx-build -W -b html doc/source doc/build

[testenv:fmt]
deps =
    -r{toxinidir}/test-requirements.txt
commands =
    yapf -ir {toxinidir}/promenade {toxinidir}/tests {toxinidir}/tools/image_tags.py

[testenv:freeze]
deps = -r{toxinidir}/requirements-direct.txt
recreate = True
whitelist_externals = sh
                      grep
commands=
    sh -c "pip freeze | grep -vE '^(promenade)|(pkg-resources)' > {toxinidir}/requirements-frozen.txt"

[testenv:gate-lint]
deps =
    jsonschema==2.6.0
whitelist_externals = sh
commands =
    {toxinidir}/tools/lint_gate.sh

[testenv:pep8]
deps =
    -r{toxinidir}/test-requirements.txt
commands =
    yapf -rd {toxinidir}/promenade {toxinidir}/tests {toxinidir}/tools/image_tags.py
    flake8 {toxinidir}/promenade
    bandit -r promenade