summaryrefslogtreecommitdiff
path: root/tox.ini
blob: 1d5cd3592825450382b0f2db19fb3c70345ace38 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
[tox]
minversion = 2.1
envlist = py{35,27},pep8,docs,api-ref
skipsdist = True

[testenv]
usedevelop = True
# tox is silly... these need to be separated by a newline....
whitelist_externals = bash
                      find
                      rm
                      env
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
         LANG=en_US.UTF-8
         LANGUAGE=en_US:en
         LC_ALL=C
deps = -r{toxinidir}/test-requirements.txt
commands =
  find . -type f -name "*.pyc" -delete
  rm -f .testrepository/times.dbm

[testenv:py27]
commands =
    {[testenv]commands}
    stestr --test-path 'ec2api/tests/unit' run '{posargs}'
    stestr slowest

[testenv:py35]
commands =
    {[testenv]commands}
    stestr --test-path 'ec2api/tests/unit' run '{posargs}'
    stestr slowest

[testenv:py36]
commands =
    {[testenv]commands}
    stestr --test-path 'ec2api/tests/unit' run '{posargs}'
    stestr slowest

[testenv:pep8]
basepython = python3
commands =
  flake8 {posargs}

[testenv:genconfig]
commands = oslo-config-generator --config-file=etc/ec2api/ec2api-config-generator.conf

[testenv:venv]
basepython = python3
commands = {posargs}

[testenv:docs]
basepython = python3
# This environment is called from CI scripts to test and publish
# the API Ref and Docs to developer.openstack.org.
commands = python setup.py build_sphinx

[testenv:api-ref]
# This environment is called from CI scripts to test and publish
# the API Ref to developer.openstack.org.
commands =
  rm -rf api-ref/build
  sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html

[flake8]
# E712 is ignored on purpose, since it is normal to use 'column == true'
#      in sqlalchemy.
# TODO Hacking 0.6 checks to fix
# H102  Apache 2.0 license header not found

ignore = E121,E122,E123,E124,E126,E127,E128,E711,E712,H102,H303,H404,F403,F811,F841
# H106: Don't put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
enable-extensions=H106,H203
exclude =  .venv,.git,.tox,dist,envname,*lib/python*,*egg,build,tools
max-complexity=25

[hacking]
local-check-factory = ec2api.hacking.checks.factory

[testenv:lower-constraints]
basepython = python3
deps =
  -c{toxinidir}/lower-constraints.txt
  -r{toxinidir}/test-requirements.txt
  -r{toxinidir}/requirements.txt