| magnussonl | 2b0e2d7 | 2020-02-04 10:52:46 +0100 | [diff] [blame] | 1 | ## |
| 2 | # Copyright 2020 ArctosLabs Scandinavia AB |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 5 | # not use this file except in compliance with the License. You may obtain |
| 6 | # a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | # License for the specific language governing permissions and limitations |
| 14 | # under the License. |
| 15 | ## |
| 16 | [tox] |
| 17 | envlist = py3 |
| 18 | |
| 19 | [testenv] |
| 20 | basepython = python3 |
| 21 | install_command = python3 -m pip install -U {opts} {packages} |
| 22 | deps = -rrequirements.txt |
| 23 | -rtest-requirements.txt |
| 24 | commands = python3 -m unittest discover -v |
| 25 | |
| 26 | [testenv:coverage] |
| 27 | basepython = python3 |
| 28 | deps = -rrequirements.txt |
| 29 | -rtest-requirements.txt |
| 30 | commands = coverage run -m unittest discover |
| 31 | coverage report --omit='*site-packages*','*test*','*__init__*' |
| 32 | coverage html -d ./.tox/coverage/HTMLreport --omit='*site-packages*','*test*','*__init__*' |
| 33 | coverage xml -o ./.tox/coverage/XMLreport/coverage.xml --omit='*site-packages*','*test*','*__init__*' |
| 34 | coverage erase |
| 35 | |
| 36 | [testenv:flake8] |
| 37 | basepython = python3 |
| 38 | deps = flake8 |
| 39 | -rrequirements.txt |
| 40 | commands = flake8 {toxinidir}/osm_pla/ {toxinidir}/setup.py \ |
| 41 | --max-line-length 120 \ |
| 42 | --exclude test_mznmodels.py,.svn,CVS,.gz,.git,__pycache__,.tox,local,temp |
| 43 | |
| 44 | [testenv:build] |
| 45 | basepython = python3 |
| 46 | # changedir ={toxinidir} |
| 47 | deps = stdeb |
| 48 | setuptools-version-command |
| 49 | -rrequirements.txt |
| 50 | commands = python3 setup.py --command-packages=stdeb.command bdist_deb |