| Adam Israel | 19c5cfc | 2019-10-03 12:35:38 -0400 | [diff] [blame] | 1 | # 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 Israel | c3e6c2e | 2018-03-01 09:31:50 -0500 | [diff] [blame] | 15 | [tox] |
| beierlm | f52cb7c | 2020-04-21 16:36:35 -0400 | [diff] [blame^] | 16 | envlist = cover, flake8, pylint |
| Adam Israel | 5e08a0e | 2018-09-06 19:22:47 -0400 | [diff] [blame] | 17 | |
| Adam Israel | c3e6c2e | 2018-03-01 09:31:50 -0500 | [diff] [blame] | 18 | [testenv] |
| Adam Israel | b2a07f5 | 2019-04-25 17:17:05 -0400 | [diff] [blame] | 19 | |
| beierlm | f52cb7c | 2020-04-21 16:36:35 -0400 | [diff] [blame^] | 20 | [testenv:cover] |
| 21 | basepython = python3 |
| Adam Israel | c3e6c2e | 2018-03-01 09:31:50 -0500 | [diff] [blame] | 22 | deps = |
| beierlm | f52cb7c | 2020-04-21 16:36:35 -0400 | [diff] [blame^] | 23 | nose2 |
| 24 | -rrequirements.txt |
| 25 | -rtest-requirements.txt |
| Adam Israel | 5e08a0e | 2018-09-06 19:22:47 -0400 | [diff] [blame] | 26 | commands = |
| beierlm | f52cb7c | 2020-04-21 16:36:35 -0400 | [diff] [blame^] | 27 | 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 Israel | c3e6c2e | 2018-03-01 09:31:50 -0500 | [diff] [blame] | 32 | |
| beierlm | f52cb7c | 2020-04-21 16:36:35 -0400 | [diff] [blame^] | 33 | [testenv:pylint] |
| 34 | basepython = python3 |
| Adam Israel | c3e6c2e | 2018-03-01 09:31:50 -0500 | [diff] [blame] | 35 | deps = |
| beierlm | f52cb7c | 2020-04-21 16:36:35 -0400 | [diff] [blame^] | 36 | pylint |
| 37 | -rrequirements.txt |
| 38 | commands = |
| 39 | pylint -E n2vc |
| Mike Marchetti | 4b81dfa | 2018-04-18 10:52:18 -0400 | [diff] [blame] | 40 | |
| beierlm | f52cb7c | 2020-04-21 16:36:35 -0400 | [diff] [blame^] | 41 | [testenv:black] |
| 42 | basepython = python3 |
| 43 | deps = |
| 44 | black |
| 45 | commands = |
| 46 | black --check --diff n2vc |
| 47 | |
| 48 | [testenv:flake8] |
| 49 | basepython = python3 |
| 50 | deps = |
| 51 | flake8 |
| 52 | -rrequirements.txt |
| 53 | commands = |
| 54 | flake8 n2vc |
| 55 | |
| 56 | [flake8] |
| 57 | # W503 is invalid PEP-8 |
| 58 | max-line-length = 88 |
| 59 | show-source = True |
| 60 | ignore = W503,E203 |
| 61 | exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,devops_stages/*,.rst |
| Adam Israel | 5e08a0e | 2018-09-06 19:22:47 -0400 | [diff] [blame] | 62 | |
| Mike Marchetti | 4b81dfa | 2018-04-18 10:52:18 -0400 | [diff] [blame] | 63 | [testenv:build] |
| Adam Israel | 5e08a0e | 2018-09-06 19:22:47 -0400 | [diff] [blame] | 64 | deps = |
| beierlm | f52cb7c | 2020-04-21 16:36:35 -0400 | [diff] [blame^] | 65 | stdeb |
| 66 | setuptools-version-command |
| Mike Marchetti | 4b81dfa | 2018-04-18 10:52:18 -0400 | [diff] [blame] | 67 | commands = python3 setup.py --command-packages=stdeb.command bdist_deb |