tox updates: run py38, combine coverage, dist-as-dir

This commit is contained in:
Brian S. Stephan 2020-10-20 16:07:49 -05:00
parent 46bce5a0a5
commit f63de031f6
1 changed files with 27 additions and 7 deletions

34
tox.ini
View File

@ -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