summaryrefslogtreecommitdiff
path: root/tox.ini
blob: c94092ef33dcdba17a8ecce8736df814347b0d3c (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
[tox]
minversion = 2.0
skipsdist = True
envlist = py35,py27,pep8

[testenv]
setenv = VIRTUAL_ENV={envdir}
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
whitelist_externals = find
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
commands =
  find . -type f -name "*.py[c|o]" -delete
  ostestr {posargs}

[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees \
         -b html releasenotes/source releasenotes/build/html

[testenv:install-guide]
# builds to install-guide/build/html
commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html

[testenv:debug]
commands = oslo_debug_helper -t meteos/tests {posargs}

[testenv:debug-py27]
basepython = python2.7
commands = oslo_debug_helper -t meteos/tests {posargs}

[testenv:debug-py35]
basepython = python3.5
commands = oslo_debug_helper -t meteos/tests {posargs}

[testenv:pep8]
commands = flake8 {posargs}

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

[testenv:venv]
commands = {posargs}

[testenv:docs]
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.
whitelist_externals = rm
commands =
  rm -rf api-ref/build
  sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html

[testenv:dbrevision]
deps = -r{toxinidir}/requirements.txt
commands = alembic -c meteos/db/migrations/alembic.ini revision -m ""{posargs}

[flake8]
# Following checks are ignored on purpose:
ignore = E127,E128,E501,F401
builtins = _
exclude = .git,.tox,.testrepository,.venv,build,cover,dist,doc,*egg,api-ref/build,*/source/conf.py
# [H904] Delay string interpolations at logging calls.
enable-extensions=H904

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