diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..37e9ce7 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,7 @@ +[run] +branch = True +source = tuskarclient +omit = tuskarclient/tests/* + +[report] +ignore-errors = True diff --git a/.travis.yml b/.travis.yml index c48ffd4..8292666 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,6 @@ install: - pip install -q -r requirements.txt --use-mirrors - pip install -q -r test-requirements.txt --use-mirrors script: - - python setup.py testr + - python setup.py testr --coverage +after_success: + - coveralls diff --git a/README.rst b/README.rst index 7a446e3..881b816 100644 --- a/README.rst +++ b/README.rst @@ -1,2 +1,4 @@ .. image:: https://travis-ci.org/jistr/python-tuskarclient.png?branch=master :target: http://travis-ci.org/jistr/python-tuskarclient +.. image:: https://coveralls.io/repos/jistr/python-tuskarclient/badge.png + :target: https://coveralls.io/r/jistr/python-tuskarclient diff --git a/test-requirements.txt b/test-requirements.txt index efba0f4..d6e1b81 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,3 +11,6 @@ mock sphinx>=1.1.2 testrepository>=0.0.13 testtools>=0.9.26 + +# for coveralls.io web service +coveralls diff --git a/tox.ini b/tox.ini index cc9010c..e3bf858 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,9 @@ commands = flake8 commands = {posargs} [testenv:cover] -commands = python setup.py testr --coverage --omit='tuskarclient/tests/*' --testr-args='{posargs}' +commands = coverage erase + python setup.py testr --coverage --omit='tuskarclient/tests/*' --testr-args='{posargs}' + coverage report -m [tox:jenkins] downloadcache = ~/cache/pip