| tierno | 0c01ffa | 2018-11-19 14:39:33 +0100 | [diff] [blame] | 1 | # Copyright 2018 Telefonica S.A. |
| 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 |
| 12 | # implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| tierno | c94c3df | 2018-02-09 15:38:54 +0100 | [diff] [blame] | 16 | [tox] |
| garciaale | 9fa8999 | 2020-11-18 10:06:03 -0300 | [diff] [blame] | 17 | envlist = cover, flake8 |
| tierno | c94c3df | 2018-02-09 15:38:54 +0100 | [diff] [blame] | 18 | |
| 19 | [testenv] |
| tierno | 1bfe4e2 | 2019-09-02 16:03:25 +0000 | [diff] [blame] | 20 | usedevelop = True |
| tierno | 0c01ffa | 2018-11-19 14:39:33 +0100 | [diff] [blame] | 21 | basepython = python3 |
| tierno | 1bfe4e2 | 2019-09-02 16:03:25 +0000 | [diff] [blame] | 22 | install_command = python3 -m pip install -r requirements.txt -U {opts} {packages} |
| tierno | c94c3df | 2018-02-09 15:38:54 +0100 | [diff] [blame] | 23 | |
| garciadeblas | f417d52 | 2020-02-19 18:11:52 +0100 | [diff] [blame] | 24 | [testenv:cover] |
| 25 | basepython = python3 |
| 26 | deps = |
| 27 | nose2 |
| garciadeblas | daab269 | 2020-06-03 13:34:16 +0000 | [diff] [blame] | 28 | nose2-cov |
| 29 | coverage |
| garciadeblas | bea3074 | 2020-07-01 08:03:22 +0000 | [diff] [blame] | 30 | -rrequirements.txt |
| 31 | -rtest-requirements.txt |
| garciadeblas | f417d52 | 2020-02-19 18:11:52 +0100 | [diff] [blame] | 32 | commands = |
| 33 | coverage erase |
| 34 | nose2 -C --coverage osm_nbi --plugin nose2.plugins.junitxml -s osm_nbi/tests |
| 35 | coverage report --omit='*tests*' |
| 36 | coverage html -d ./cover --omit='*tests*' |
| 37 | coverage xml -o coverage.xml --omit='*tests*' |
| 38 | |
| tierno | c94c3df | 2018-02-09 15:38:54 +0100 | [diff] [blame] | 39 | [testenv:flake8] |
| 40 | basepython = python3 |
| garciadeblas | f417d52 | 2020-02-19 18:11:52 +0100 | [diff] [blame] | 41 | deps = |
| 42 | flake8 |
| garciadeblas | bea3074 | 2020-07-01 08:03:22 +0000 | [diff] [blame] | 43 | -rrequirements.txt |
| garciadeblas | f417d52 | 2020-02-19 18:11:52 +0100 | [diff] [blame] | 44 | commands = |
| 45 | flake8 osm_nbi setup.py --max-line-length 120 \ |
| tierno | 1bfe4e2 | 2019-09-02 16:03:25 +0000 | [diff] [blame] | 46 | --exclude .svn,CVS,.gz,.git,__pycache__,.tox,local,temp,osm_im,.temp-tox --ignore W291,W293,E226,E402,W504 |
| tierno | c94c3df | 2018-02-09 15:38:54 +0100 | [diff] [blame] | 47 | |
| 48 | [testenv:build] |
| 49 | basepython = python3 |
| 50 | deps = stdeb |
| 51 | setuptools-version-command |
| 52 | commands = python3 setup.py --command-packages=stdeb.command bdist_deb |
| tierno | 0c01ffa | 2018-11-19 14:39:33 +0100 | [diff] [blame] | 53 | |
| tierno | 1bfe4e2 | 2019-09-02 16:03:25 +0000 | [diff] [blame] | 54 | [testenv:unittest] |
| 55 | basepython = python3 |
| preethika.p | 0952a48 | 2019-09-20 16:37:50 +0530 | [diff] [blame] | 56 | deps = asynctest |
| 57 | aioresponses |
| garciadeblas | bea3074 | 2020-07-01 08:03:22 +0000 | [diff] [blame] | 58 | commands = python3 -m unittest discover osm_nbi/tests -v |
| tierno | 1bfe4e2 | 2019-09-02 16:03:25 +0000 | [diff] [blame] | 59 | |