From f63de031f6d4b0525f243e31c8680522b447c994 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Tue, 20 Oct 2020 16:07:49 -0500 Subject: [PATCH] tox updates: run py38, combine coverage, dist-as-dir --- tox.ini | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/tox.ini b/tox.ini index b355eae..a1079ba 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py37,security,lint +envlist = begin,py37,py38,coverage,security,lint,bundle [testenv] # build a wheel and test it @@ -12,7 +12,7 @@ wheel = true wheel_build_env = build # whitelist commands we need -whitelist_externals = ln +whitelist_externals = cp # install everything via requirements-dev.txt, so that developer environment # is the same as the tox environment (for ease of use/no weird gotchas in @@ -26,12 +26,26 @@ deps = # require setuptools when building deps = setuptools +[testenv:begin] +# clean up potential previous coverage runs +skip_install = true +commands = coverage erase + [testenv:py37] # run pytest with coverage commands = - pytest --cov={envsitepackagesdir}/incorporealcms/ \ - --cov-report=term-missing --cov-branch --cov-fail-under=95 - ln -sf {distdir} . + pytest --cov-append --cov={envsitepackagesdir}/incorporealcms/ --cov-branch + +[testenv:py38] +# run pytest with coverage +commands = + pytest --cov-append --cov={envsitepackagesdir}/incorporealcms/ --cov-branch + +[testenv:coverage] +# report on coverage runs from above +skip_install = true +commands = + coverage report --fail-under=95 --show-missing [testenv:security] # run security checks @@ -44,7 +58,13 @@ commands = # run style checks commands = flake8 - - flake8 --disable-noqa --ignore= --select=E,W,F,C,D,A,G,B,I,T,DUO + - flake8 --disable-noqa --ignore= --select=E,W,F,C,D,A,G,B,I,T,M,DUO + +[testenv:bundle] +# take extra actions (build sdist, sphinx, whatever) to completely package the app +commands = + cp -r {distdir} . + python setup.py sdist [coverage:paths] source = @@ -64,7 +84,7 @@ omit = **/_version.py [flake8] -enable-extensions = G +enable-extensions = G,M exclude = .tox/ versioneer.py