diff options
author | Bernát Gábor <bgabor8@bloomberg.net> | 2021-02-14 09:52:21 +0000 |
---|---|---|
committer | Bernát Gábor <gaborjbernat@gmail.com> | 2021-02-15 07:52:20 +0000 |
commit | d13f172b37678422bfcdaaa9610b41ac633d5590 (patch) | |
tree | 6b262bcb8b4f03ec3ce9aa9982deaeec27433a4e /tox.ini | |
parent | e30fd7466c3bcf4ff3408b2cb6dc46da97ee7d5e (diff) | |
download | tox-git-d13f172b37678422bfcdaaa9610b41ac633d5590.tar.gz |
Add release task
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 66 |
1 files changed, 40 insertions, 26 deletions
@@ -1,7 +1,7 @@ [tox] envlist = - fix flake8 + fix py39 py38 py37 @@ -16,8 +16,6 @@ minversion = 3.21 [testenv] description = run the tests with pytest -package = wheel -wheel_build_env = .pkg passenv = PYTEST_* SSL_CERT_FILE @@ -34,6 +32,21 @@ commands = --cov-report xml:{toxworkdir}{/}coverage.{envname}.xml \ -n={env:PYTEST_XDIST_PROC_NR:auto} \ tests --durations 5 --run-integration} +package = wheel +wheel_build_env = .pkg + +[testenv:flake8] +description = run style checker on the code +skip_install = true +deps = + flake8==3.8.4 + flake8-bugbear==20.11.1 + flake8-comprehensions==3.3.1 + flake8-pytest-style==1.3 + flake8-spellcheck==0.23 + flake8-unused-arguments==0.0.6 +commands = + flake8 src tests docs [testenv:fix] description = format the code base to adhere to our styles, and complain about what we cannot do automatically @@ -48,28 +61,6 @@ commands = pre-commit run --all-files --show-diff-on-failure {tty:--color=always} {posargs} python -c 'print(r"hint: run {envbindir}{/}pre-commit install to add checks as pre-commit hook")' -[testenv:type] -description = run type check on code base -setenv = {tty:MYPY_FORCE_COLOR = 1} -deps = - mypy==0.800 -commands = - mypy src/tox - mypy tests - -[testenv:flake8] -skip_install = true -description = run style checker on the code -deps = - flake8 == 3.8.4 - flake8-bugbear == 20.11.1 - flake8-unused-arguments == 0.0.6 - flake8-comprehensions == 3.3.1 - flake8-spellcheck == 0.23.0 - flake8-pytest-style == 1.3.0 -commands = - flake8 src tests docs - [testenv:cov] description = merge existing coverage reports and report coverage diff against DIFF_MASTER env-var (default upstream/rewrite) passenv = @@ -79,8 +70,8 @@ setenv = COVERAGE_FILE = {toxworkdir}/.coverage skip_install = true deps = - coverage>=5 covdefaults>=1.2 + coverage>=5 diff_cover>=4 parallel_show_output = true commands = @@ -95,6 +86,16 @@ depends = py37 py36 +[testenv:type] +description = run type check on code base +setenv = + {tty:MYPY_FORCE_COLOR = 1} +deps = + mypy==0.800 +commands = + mypy src/tox + mypy tests + [testenv:docs] description = build documentation basepython = python3.9 @@ -115,10 +116,23 @@ commands = python -m build -o {envtmpdir} -s -w . twine check {envtmpdir}{/}* +[testenv:release] +description = do a release, required posarg of the version number +passenv = + * +basepython = python3.8 +deps = + gitpython>=3.1 + packaging>=20.9 + towncrier>=19.9.0rc1 +commands = + python {toxinidir}/tasks/release.py --version {posargs} + [testenv:dev] description = dev environment with all deps at {envdir} usedevelop = true deps = + {[testenv:release]deps} setuptools_scm>=3 extras = docs |