Skip to content
tox.ini 1.53 KiB
Newer Older
[tox]
envlist =
    {py35,py36,py37}-test
    lint
    sort
    format
    type
    docs
    changelog
skip_missing_interpreters = True

[testenv]
description = run the unit tests
passenv = *
deps = 
decentral1se's avatar
decentral1se committed
  pytest >= 5.0.1, < 6.0
  pytest-cov >= 2.7.1, < 3.0
  pytest-mock >= 1.10.4, < 1.11
  requests-mock >= 1.6.0, < 1.7
commands = 
  pytest test/ --cov={toxinidir}/librehosters_cli/ --no-cov-on-fail {posargs}

[testenv:lint]
description = lint the source
skipsdist = True
commands = 
  flake8 {posargs} librehosters_cli/ test/

[testenv:sort]
description = sort the source
skipsdist = True
commands = 
  isort {posargs:-rc -c} -sp setup.cfg librehosters_cli/ test/

[testenv:format]
description = format the source
basepython = python3.6
skipsdist = True
commands = 
  black {posargs:--check} librehosters_cli/ test/

[testenv:type]
description = type check the source
basepython = python3.7
skipsdist = True
commands = 
  mypy librehosters_cli/ test/

[testenv:docs]
description = build the documentation
skipsdist = True
commands = 
  python -m setup build_sphinx
decentral1se's avatar
decentral1se committed

[testenv:changelog]
description = draft the changelog
skipsdist = True
decentral1se's avatar
decentral1se committed
deps = 
  towncrier
commands = 

[testenv:metadata-release]
description = validate the package metadata
commands =
  twine check .tox/dist/*

[testenv:release]
description = make a production release
deps =
  {[testenv:metadata-release]deps}
commands =
    python -m setup sdist bdist_wheel
    twine upload dist/*