blob: 2ca433c4118fc56b9473d22d4a12efc439ed37e5 [file] [log] [blame]
# Copyright 2019 Canonical Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[tox]
envlist = cover, flake8, pylint, pylint-tests
skipsdist=True
[testenv]
[testenv:cover]
basepython = python3
deps =
nose2
-rrequirements.txt
-rtest-requirements.txt
commands =
coverage erase
nose2 -C --coverage n2vc --plugin nose2.plugins.junitxml -s n2vc
coverage report --omit='*n2vc/tests*'
coverage html -d ./cover --omit='*n2vc/tests*'
coverage xml -o coverage.xml --omit='*n2vc/tests*'
[testenv:pylint]
basepython = python3
deps =
pylint==2.5.3
-rrequirements.txt
commands =
pylint -E n2vc --ignore=tests
[testenv:pylint-tests]
basepython = python3
deps =
pylint==2.5.3
-rrequirements.txt
-rtest-requirements.txt
commands =
pylint -E n2vc.tests
[testenv:black]
basepython = python3
deps =
black
commands =
black --check --diff n2vc
[testenv:flake8]
basepython = python3
deps =
flake8
-rrequirements.txt
commands =
flake8 n2vc
[flake8]
# W503 is invalid PEP-8
max-line-length = 100
show-source = True
ignore = W503,E203
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,devops_stages/*,.rst
[testenv:build]
deps =
stdeb
setuptools-version-command
commands = python3 setup.py --command-packages=stdeb.command bdist_deb