1e0b679ec6901e6bf44e1db9c62f80e49ff8de96
[osm/LCM.git] / tox.ini
1 # Copyright 2018 Telefonica S.A.
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
12 # implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 [tox]
17 envlist = cover, flake8, unittest
18
19 [testenv]
20 basepython = python3
21 install_command = python3 -m pip install -r requirements.txt -U {opts} {packages}
22 deps = -rtest-requirements.txt
23 commands=
24 python3 -m unittest discover -v
25
26 [testenv:cover]
27 basepython = python3
28 deps =
29 nose2
30 nose2-cov
31 coverage
32 -rrequirements.txt
33 -rtest-requirements.txt
34 commands =
35 coverage erase
36 nose2 -C --coverage osm_lcm --plugin nose2.plugins.junitxml -s osm_lcm/tests
37 coverage report --omit='*tests*'
38 coverage html -d ./cover --omit='*tests*'
39 coverage xml -o coverage.xml --omit='*tests*'
40
41 [testenv:flake8]
42 basepython = python3
43 deps =
44 flake8
45 -rrequirements.txt
46 commands = flake8 osm_lcm --max-line-length 120 \
47 --exclude .svn,CVS,.gz,.git,__pycache__,.tox,local,temp,frontend_grpc.py,frontend_pb2.py \
48 --ignore W291,W293,E226,W504
49
50 [testenv:unittest]
51 basepython = python3
52 deps = asynctest
53 commands = python3 -m unittest osm_lcm.tests.test_ns
54
55 [testenv:build]
56 basepython = python3
57 deps = stdeb
58 setuptools-version-command
59 commands = python3 setup.py --command-packages=stdeb.command bdist_deb
60