flat-tree/tox.ini

70 lines
1.4 KiB
INI
Raw Normal View History

[tox]
envlist =
2019-10-06 13:29:05 +00:00
{py36,py37}
lint
sort
format
type
docs
changelog
metadata-release
skip_missing_interpreters = True
isolated_build = True
[testenv]
description = run the unit tests
deps =
pytest
pytest-cov
pytest-mock
2019-10-06 13:30:15 +00:00
commands = pytest test/ --cov={toxinidir}/flat_tree/ --no-cov-on-fail {posargs}
[testenv:lint]
description = lint the source
skipdist = True
2019-10-06 13:30:15 +00:00
deps = flake8
commands = flake8 {posargs} flat_tree/ test/
[testenv:sort]
description = sort the source
skipdist = True
2019-10-06 13:30:15 +00:00
deps = isort
commands = isort {posargs:-rc -c} -sp setup.cfg flat_tree/ test/
[testenv:format]
description = format the source
skipdist = True
basepython = python3.6
2019-10-06 13:30:15 +00:00
deps = black
commands = black {posargs:--check} flat_tree/ test/
[testenv:type]
description = type check the source
basepython = python3.7
skipdist = True
2019-10-06 13:30:15 +00:00
deps = mypy
commands = mypy flat_tree/ test/
[testenv:docs]
description = build the documentation
2019-10-06 13:30:15 +00:00
extras = docs
commands = python -m setup build_sphinx
[testenv:changelog]
description = draft the changelog
skipdist = True
2019-10-06 13:30:15 +00:00
deps = towncrier
commands = towncrier --draft
[testenv:metadata-release]
description = validate the package metadata
2019-10-06 13:30:15 +00:00
deps = twine
commands = twine check {toxworkdir}/dist/*
[testenv:release]
description = make a release
2019-10-06 13:30:15 +00:00
deps = {[testenv:metadata-release]deps}
commands =
python -m setup sdist bdist_wheel
twine upload {toxworkdir}/dist/*