blob: d2674c9798414608308f698d0925e226f03b1deb [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
beierlmd5989142020-05-06 12:05:16 -040017skipsdist=True
Adam Israel5e08a0e2018-09-06 19:22:47 -040018
Adam Israelc3e6c2e2018-03-01 09:31:50 -050019[testenv]
Adam Israelb2a07f52019-04-25 17:17:05 -040020
beierlmf52cb7c2020-04-21 16:36:35 -040021[testenv:cover]
22basepython = python3
Adam Israelc3e6c2e2018-03-01 09:31:50 -050023deps =
beierlmf52cb7c2020-04-21 16:36:35 -040024 nose2
25 -rrequirements.txt
26 -rtest-requirements.txt
Adam Israel5e08a0e2018-09-06 19:22:47 -040027commands =
beierlmf52cb7c2020-04-21 16:36:35 -040028 coverage erase
29 nose2 -C --coverage n2vc --plugin nose2.plugins.junitxml -s n2vc
30 coverage report --omit='*tests*'
31 coverage html -d ./cover --omit='*tests*'
32 coverage xml -o coverage.xml --omit='*tests*'
Adam Israelc3e6c2e2018-03-01 09:31:50 -050033
beierlmf52cb7c2020-04-21 16:36:35 -040034[testenv:pylint]
35basepython = python3
Adam Israelc3e6c2e2018-03-01 09:31:50 -050036deps =
beierlmf52cb7c2020-04-21 16:36:35 -040037 pylint
38 -rrequirements.txt
39commands =
40 pylint -E n2vc
Mike Marchetti4b81dfa2018-04-18 10:52:18 -040041
beierlmf52cb7c2020-04-21 16:36:35 -040042[testenv:black]
43basepython = python3
44deps =
45 black
46commands =
47 black --check --diff n2vc
48
49[testenv:flake8]
50basepython = python3
51deps =
52 flake8
53 -rrequirements.txt
54commands =
55 flake8 n2vc
56
57[flake8]
58# W503 is invalid PEP-8
59max-line-length = 88
60show-source = True
61ignore = W503,E203
62exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,devops_stages/*,.rst
Adam Israel5e08a0e2018-09-06 19:22:47 -040063
Mike Marchetti4b81dfa2018-04-18 10:52:18 -040064[testenv:build]
Adam Israel5e08a0e2018-09-06 19:22:47 -040065deps =
beierlmf52cb7c2020-04-21 16:36:35 -040066 stdeb
67 setuptools-version-command
Mike Marchetti4b81dfa2018-04-18 10:52:18 -040068commands = python3 setup.py --command-packages=stdeb.command bdist_deb