ros-testing/hypothesis-ros

View on GitHub
tox.ini

Summary

Maintainability
Test Coverage
[tox]
envlist = py27, tests, radon, sdist, wheel
skip_missing_interpreters = true
skipsdist = true

[travis]
python =
  2.7: py27, tests, radon

[testenv]
basepython = python2.7
setenv =
    PYTHONPATH = {toxinidir}:{toxinidir}/hypothesis_ros
deps =
    -r{toxinidir}/requirements.txt
    -r{toxinidir}/test-requirements.txt
passenv =
    COVERALLS_REPO_TOKEN
    CODECOV_TOKEN

[testenv:tests]
description = run Python only dependency tests with pytest test runner
commands =
    pytest --ignore=tests/converters --cov-report term-missing --cov-config=.coveragerc --cov=hypothesis_ros tests
    coveralls
    codecov

[testenv:lint]
description = run static analysis with pylint
commands = pylint --rcfile=pylint.rc -f colorized hypothesis_ros

[testenv:radon]
description = run maintainability anaylsis with radon
commands = radon mi hypothesis_ros

[testenv:code_style]
description = run code style checks with pycodestyle
commands = pycodestyle hypothesis_ros

[testenv:docs_style]
description = run docstring style checks with pycodestyle
commands = pydocstyle hypothesis_ros

[testenv:docs]
description = run documentation integrity check with Sphinx
commands =
    - sphinx-apidoc -f -o docs/source/ hypothesis_ros
    - sphinx-build -b html docs/source/ docs/build/

[testenv:coverage-report]
description = run tests and generate html coverage report, browse with "python -m webbrowser ./htmlcov/index.html"
commands =
    pytest --cov-report html --cov-config=.coveragerc --cov=hypothesis_ros tests

[testenv:sdist]
commands=python setup.py sdist

[testenv:wheel]
commands=python setup.py bdist_wheel

[testenv:test-release]
skip_install = true
passenv =
    TWINE_USERNAME
    TWINE_PASSWORD
commands =
    {[testenv:sdist]commands}
    {[testenv:wheel]commands}
    twine upload --config-file .pypirc --skip-existing --repository testpypi dist/*

[testenv:release]
passenv =
    TWINE_USERNAME
    TWINE_PASSWORD
commands =
    {[testenv:sdist]commands}
    {[testenv:wheel]commands}
    twine upload --config-file .pypirc --skip-existing dist/*