[tox] skip_missing_interpreters = True envlist = py35, py36, inst, setup, unit, integration, lint, stats, doc [travis] python = 3.5: py35, inst, setup, unit, integration, lint, doc, doclinks 3.6: py36, inst, setup, unit, integration [testenv] # install_command can be removed when --process-dependency-links is not # needed anymore, and this section commented # install_command = pip install {opts} {packages} # test that it can be installed with custom commands and clean env [testenv:inst] skip_install = True commands = # this will fail until --process-dependency-links is not needed # it needs to be commented since error code will be still 1 - pip install . ignore_errors = True recreate = True [testenv:setup] skip_install = True # this will fail until --process-dependency-links is not needed # it needs to be commented since error code will be still 1 commands = python setup.py install recreate = True [testenv:unit] deps = .[test] commands = coverage run -a --rcfile={toxinidir}/.coveragerc --source=sbws -m pytest \ -s {toxinidir}/tests/unit -vv [testenv:integration] ignore_errors = True deps = .[test] whitelist_externals = cp bash sleep wget mkdir commands = cp -af {toxinidir}/tests/integration/net {envtmpdir} bash {envtmpdir}/net/start.sh bash -c "time python3 {envtmpdir}/net/wait.py {envtmpdir}/net/{auth,relay,exit}*" bash -c "python3 {toxinidir}/scripts/tools/sbws-http-server.py --port 28888 &>/dev/null &" sleep 1 wget -O/dev/null http://127.0.0.1:28888/sbws.bin ; Run actually the scanner mkdir -p /tmp/.sbws ; This add around 3min more to the tests sbws -c {toxinidir}/tests/integration/sbws_testnet.ini scanner coverage run -a --rcfile={toxinidir}/.coveragerc --source=sbws -m pytest -s {toxinidir}/tests/integration -vv bash {envtmpdir}/net/stop.sh # no need to remove .tox/net directory. rm -rf /tmp/.sbws [testenv:lint] skip_install = True deps = .[dev] commands = flake8 sbws scripts tests [testenv:clean] skip_install = True changedir={toxinidir} deps = coverage command = coverage erase [testenv:stats] skip_install = True changedir={toxinidir} deps = .[test] commands= # nothing to combine while not using several python versions # coverage combine coverage report coverage html [testenv:doc] deps = .[doc] whitelist_externals = make changedir = docs commands = make html # this requires build the pdf images # make latexpdf make man # this requires Internet, it should not be in envlist [testenv:doclinks] deps = .[doc] whitelist_externals = make changedir = docs commands = make linkcheck