summaryrefslogtreecommitdiffstats
path: root/tox.ini
blob: b8efce649a7f4fae552fff6c5e7d972f1f35e8bb (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
##############################################################################
# Copyright (c) 2019 opnfv.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

[tox]
minversion = 2.5
skipsdist = True
envlist =
    pep8,
    py35,
    docs,
    docs-linkcheck

[testenv]
basepython=python3.5
usedevelop = True
install_command = pip3 install -U {opts} {packages}
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
commands =
  py.test \
    --basetemp={envtmpdir} \
    --cov=dovetail \
    --cov-report term-missing \
    --cov-report xml \
    --cov-fail-under=100 \
     --ignore=cvp \
    {posargs}
setenv =
  VIRTUAL_ENV={envdir}
  HOME = {envtmpdir}
  PYTHONPATH = {toxinidir}
whitelist_externals = wget
                      touch
                      echo

[testenv:pep8]
commands = flake8 {toxinidir}

[flake8]
show-source = True
ignore = E123,E125,H803,E722,W503
exclude = .tox,dist,docs,*egg,build,.venv,.git

[testenv:docs]
deps = -rdocs/requirements.txt
commands =
    sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
    echo "Generated docs available in {toxinidir}/docs/_build/html"
whitelist_externals = echo

[testenv:docs-linkcheck]
deps = -rdocs/requirements.txt
commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck

[testenv:yamllint]
basepython = python3.5
files =
  etc
commands =
  yamllint -s {[testenv:yamllint]files}