SteinHeselmans/DucoBox

View on GitHub
tox.ini

Summary

Maintainability
Test Coverage
[tox]
envlist =
    clean,
    check,
    {py27,py35},
    docs

[testenv]
basepython =
    pypy: {env:TOXPYTHON:pypy}
    {py27,docs,spell}: {env:TOXPYTHON:python2.7}
    py34: {env:TOXPYTHON:python3.4}
    py35: {env:TOXPYTHON:python3.5}
    py36: {env:TOXPYTHON:python3.6}
    py37: {env:TOXPYTHON:python3.7}
    {clean,check,report,coveralls,codecov}: python3
setenv =
    PYTHONPATH={toxinidir}/tests
    PYTHONUNBUFFERED=yes
passenv =
    *
usedevelop = false
deps =
    pytest
    pytest-travis-fold
    pytest-cov
    mock
    coverage
    pyserial
commands =
    {posargs:py.test --cov=duco --cov-report=term-missing -vv tests/}
    ducobox -h
    ducobox --version
    python -c 'import duco.ducobox;print(duco.ducobox.__version__)'
    python -m duco.ducobox -h
    python -m duco.ducobox --version

[testenv:spell]
setenv =
    SPELLCHECK=1
commands =
    sphinx-build -b spelling docs dist/docs
skip_install = true
deps =
    -r{toxinidir}/docs/requirements.txt
    sphinxcontrib-spelling
    pyenchant
    pyserial

[testenv:docs]
deps =
    -r{toxinidir}/docs/requirements.txt
    sphinxcontrib-plantuml
    pyserial
commands =
    sphinx-build {posargs:-E} -b doctest docs dist/docs
    sphinx-build {posargs:-E} -b html docs dist/docs
    sphinx-build -b linkcheck docs dist/docs

[testenv:check]
deps =
    docutils
    readme-renderer
    flake8
    pygments
    pyserial
skip_install = true
commands =
    python setup.py check --strict --metadata --restructuredtext
    flake8 src tests setup.py

[testenv:coveralls]
deps =
    coveralls
skip_install = true
commands =
    coveralls []

[testenv:codecov]
deps =
    codecov
skip_install = true
commands =
    coverage xml --ignore-errors
    codecov []


[testenv:report]
deps = coverage
skip_install = true
commands =
    coverage combine --append
    coverage report
    coverage html

[testenv:clean]
commands = coverage erase
skip_install = true
deps = coverage