diff --git a/.zuul.yaml b/.zuul.yaml index 635a24d5..50c23ce7 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -14,6 +14,7 @@ templates: - openstack-python35-jobs - openstack-python36-jobs + - openstack-cover-jobs check: jobs: - openstack-tox-pep8 diff --git a/tox.ini b/tox.ini index 1df364f9..caa91d22 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py35, py36, pep8, docs +envlist = py35, py36, pep8, docs, cover minversion = 2.3.1 # Allows docs to be built without setup.py having to exist. Requires that # usedevelop be False as well (which it is by default). @@ -47,6 +47,14 @@ commands = basepython=python3 commands = bandit -r pegleg -n 5 +[testenv:cover] +basepython = python3 +deps = + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt +commands = + pytest --cov=pegleg --cov-report html:cover --cov-report xml:cover/coverage.xml --cov-report term --cov-fail-under 84 tests/ + [testenv:venv] commands = {posargs}