Add loop and vca_config options to K8sJujuConnector constructor
[osm/N2VC.git] / tox.ini
1 # Copyright 2019 Canonical Ltd.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 [tox]
16 envlist = cover, flake8, pylint, pylint-tests
17 skipsdist=True
18
19 [testenv]
20
21 [testenv:cover]
22 basepython = python3
23 deps =
24 nose2
25 -rrequirements.txt
26 -rtest-requirements.txt
27 commands =
28 coverage erase
29 nose2 -C --coverage n2vc --plugin nose2.plugins.junitxml -s n2vc
30 coverage report --omit='*n2vc/tests*'
31 coverage html -d ./cover --omit='*n2vc/tests*'
32 coverage xml -o coverage.xml --omit='*n2vc/tests*'
33
34 [testenv:pylint]
35 basepython = python3
36 deps =
37 pylint
38 -rrequirements.txt
39 commands =
40 pylint -E n2vc --ignore=tests
41
42 [testenv:pylint-tests]
43 basepython = python3
44 deps =
45 pylint
46 -rrequirements.txt
47 -rtest-requirements.txt
48 commands =
49 pylint -E n2vc.tests
50
51 [testenv:black]
52 basepython = python3
53 deps =
54 black
55 commands =
56 black --check --diff n2vc
57
58 [testenv:flake8]
59 basepython = python3
60 deps =
61 flake8
62 -rrequirements.txt
63 commands =
64 flake8 n2vc
65
66 [flake8]
67 # W503 is invalid PEP-8
68 max-line-length = 100
69 show-source = True
70 ignore = W503,E203
71 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,devops_stages/*,.rst
72
73 [testenv:build]
74 deps =
75 stdeb
76 setuptools-version-command
77 commands = python3 setup.py --command-packages=stdeb.command bdist_deb