Add license to Jenkinsfile
[osm/N2VC.git] / tox.ini
1 # Tox (http://tox.testrun.org/) is a tool for running tests
2 # in multiple virtualenvs. This configuration file will run the
3 # test suite on all supported python versions. To use it, "pip install tox"
4 # and then run "tox" from this directory.
5
6 [tox]
7 envlist = py3,lint,integration
8 skipsdist=True
9
10 [pytest]
11 markers =
12 serial: mark a test that must run by itself
13
14 [testenv]
15 basepython=python3
16 usedevelop=True
17
18 # for testing with other python versions
19 commands = py.test --ignore modules/ --ignore tests/charms/ --tb native -ra -v -s -n auto -k 'not integration' -m 'not serial' {posargs}
20 passenv =
21 HOME
22 VCA_PATH
23 VCA_HOST
24 VCA_PORT
25 VCA_USER
26 VCA_SECRET
27 LXD_HOST
28 LXD_SECRET
29 # These are needed so executing `charm build` succeeds
30 TERM
31 TERMINFO
32 deps =
33 mock
34 pyyaml
35 pytest
36 pytest-asyncio
37 pytest-xdist
38 pytest-assume
39 paramiko
40 pylxd
41
42 [testenv:py3]
43 # default tox env, excludes integration and serial tests
44 commands =
45 pytest --ignore modules/ --ignore tests/charms/ --tb native -ra -v -s -n auto -k 'not integration' -m 'not serial' {posargs}
46
47 [testenv:lint]
48 envdir = {toxworkdir}/py3
49 commands =
50 flake8 --ignore E501,E402 --exclude tests/charms/builds,tests/charms/deps {posargs} n2vc tests
51 deps =
52 flake8
53
54 [testenv:integration]
55 envdir = {toxworkdir}/py3
56 commands = py.test --ignore modules/ --ignore tests/charms/ --tb native -ra -v -s -n 1 -k 'integration' -m 'serial' {posargs}
57
58 [testenv:build]
59 deps =
60 stdeb
61 setuptools-version-command
62 commands = python3 setup.py --command-packages=stdeb.command bdist_deb