1 # Copyright 2021 Canonical Ltd.
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may
4 # not use this file except in compliance with the License. You may obtain
5 # a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations
15 # For those usages not covered by the Apache License, Version 2.0 please
16 # contact: legal@canonical.com
18 # To get in touch with the maintainers, please contact:
19 # osm-charmers@lists.launchpad.net
21 #######################################################################################
24 envlist = flake8, cover, pylint, safety, yamllint
28 basepython = python3.8
32 PYTHONPATH = {toxinidir}/src
33 deps = -r{toxinidir}/requirements.txt
35 #######################################################################################
37 deps = {[testenv]deps}
38 -r
{toxinidir
}/requirements
-test.txt
40 sh
-c 'rm
-f nosetests.xml'
42 nose2
-C
--coverage src
43 coverage report --omit='*tests*'
44 coverage html -d ./cover --omit='*tests*'
45 coverage xml -o coverage.xml --omit=*tests*
46 whitelist_externals = sh
48 #######################################################################################
53 deps = {[testenv]deps}
54 -r
{toxinidir
}/requirements
-test.txt
56 - safety check
--full
-report
58 #######################################################################################
64 #######################################################################################
66 deps = {[testenv]deps}
67 -r
{toxinidir
}/requirements
-test.txt
72 #######################################################################################
74 deps = {[testenv]deps}
75 -r
{toxinidir
}/requirements
-test.txt
77 commands = black --check --diff . --exclude "build/|.tox/|mod/|lib/"
79 #######################################################################################
81 deps = {[testenv]deps}
82 -r
{toxinidir
}/requirements
-test.txt
86 #######################################################################################
88 passenv=HTTP_PROXY HTTPS_PROXY NO_PROXY
89 deps = {[testenv]deps}
90 -r
{toxinidir
}/requirements
-test.txt
99 #######################################################################################
112 max-line-length = 120