blob: bd8924103d199f7ca7deee6b0b1c126eadb5c69e [file] [log] [blame]
Adam Israel19c5cfc2019-10-03 12:35:38 -04001# 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
Adam Israelc3e6c2e2018-03-01 09:31:50 -050015[tox]
beierlmf52cb7c2020-04-21 16:36:35 -040016envlist = cover, flake8, pylint
Adam Israel5e08a0e2018-09-06 19:22:47 -040017
Adam Israelc3e6c2e2018-03-01 09:31:50 -050018[testenv]
Adam Israelb2a07f52019-04-25 17:17:05 -040019
beierlmf52cb7c2020-04-21 16:36:35 -040020[testenv:cover]
21basepython = python3
Adam Israelc3e6c2e2018-03-01 09:31:50 -050022deps =
beierlmf52cb7c2020-04-21 16:36:35 -040023 nose2
24 -rrequirements.txt
25 -rtest-requirements.txt
Adam Israel5e08a0e2018-09-06 19:22:47 -040026commands =
beierlmf52cb7c2020-04-21 16:36:35 -040027 coverage erase
28 nose2 -C --coverage n2vc --plugin nose2.plugins.junitxml -s n2vc
29 coverage report --omit='*tests*'
30 coverage html -d ./cover --omit='*tests*'
31 coverage xml -o coverage.xml --omit='*tests*'
Adam Israelc3e6c2e2018-03-01 09:31:50 -050032
beierlmf52cb7c2020-04-21 16:36:35 -040033[testenv:pylint]
34basepython = python3
Adam Israelc3e6c2e2018-03-01 09:31:50 -050035deps =
beierlmf52cb7c2020-04-21 16:36:35 -040036 pylint
37 -rrequirements.txt
38commands =
39 pylint -E n2vc
Mike Marchetti4b81dfa2018-04-18 10:52:18 -040040
beierlmf52cb7c2020-04-21 16:36:35 -040041[testenv:black]
42basepython = python3
43deps =
44 black
45commands =
46 black --check --diff n2vc
47
48[testenv:flake8]
49basepython = python3
50deps =
51 flake8
52 -rrequirements.txt
53commands =
54 flake8 n2vc
55
56[flake8]
57# W503 is invalid PEP-8
58max-line-length = 88
59show-source = True
60ignore = W503,E203
61exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,devops_stages/*,.rst
Adam Israel5e08a0e2018-09-06 19:22:47 -040062
Mike Marchetti4b81dfa2018-04-18 10:52:18 -040063[testenv:build]
Adam Israel5e08a0e2018-09-06 19:22:47 -040064deps =
beierlmf52cb7c2020-04-21 16:36:35 -040065 stdeb
66 setuptools-version-command
Mike Marchetti4b81dfa2018-04-18 10:52:18 -040067commands = python3 setup.py --command-packages=stdeb.command bdist_deb