summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTin Lam <tin@irrational.io>2018-11-06 16:49:48 -0600
committerTin Lam <tin@irrational.io>2018-11-06 20:59:01 -0600
commit178c058474fb632806e281673d3eaf6be80fa854 (patch)
tree2d808a6aca1406cfeb739522ad3d251b474f97b5
parentc7270554dacd534011fbbf5f8859ac3971e24f3e (diff)
Add coverage job
This patch set adds in a python coverage job for pegleg using pytest. Change-Id: Ice0332cc454f488e0372d5ab03e8b0a37db9efd1 Signed-off-by: Tin Lam <tin@irrational.io>
Notes
Notes (review): Code-Review+2: Felipe Monteiro <felipe.monteiro@att.com> Code-Review+2: Scott Hussey <sthussey@att.com> Workflow+1: Scott Hussey <sthussey@att.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 07 Nov 2018 16:03:10 +0000 Reviewed-on: https://review.openstack.org/616024 Project: openstack/airship-pegleg Branch: refs/heads/master
-rw-r--r--.zuul.yaml1
-rw-r--r--tox.ini10
2 files changed, 10 insertions, 1 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index 635a24d..50c23ce 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -14,6 +14,7 @@
14 templates: 14 templates:
15 - openstack-python35-jobs 15 - openstack-python35-jobs
16 - openstack-python36-jobs 16 - openstack-python36-jobs
17 - openstack-cover-jobs
17 check: 18 check:
18 jobs: 19 jobs:
19 - openstack-tox-pep8 20 - openstack-tox-pep8
diff --git a/tox.ini b/tox.ini
index 1df364f..caa91d2 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
1[tox] 1[tox]
2envlist = py35, py36, pep8, docs 2envlist = py35, py36, pep8, docs, cover
3minversion = 2.3.1 3minversion = 2.3.1
4# Allows docs to be built without setup.py having to exist. Requires that 4# Allows docs to be built without setup.py having to exist. Requires that
5# usedevelop be False as well (which it is by default). 5# usedevelop be False as well (which it is by default).
@@ -47,6 +47,14 @@ commands =
47basepython=python3 47basepython=python3
48commands = bandit -r pegleg -n 5 48commands = bandit -r pegleg -n 5
49 49
50[testenv:cover]
51basepython = python3
52deps =
53 -r{toxinidir}/requirements.txt
54 -r{toxinidir}/test-requirements.txt
55commands =
56 pytest --cov=pegleg --cov-report html:cover --cov-report xml:cover/coverage.xml --cov-report term --cov-fail-under 84 tests/
57
50[testenv:venv] 58[testenv:venv]
51commands = {posargs} 59commands = {posargs}
52 60