summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoey Prat <roey.prat@redislabs.com>2019-06-25 20:51:39 +0300
committerAndy McCurdy <andy@andymccurdy.com>2019-06-25 10:51:39 -0700
commit0be4d2920684345eb52115c7142c39d65356e7d4 (patch)
treed8979f8ec4b78758e5e024d93661304f0835426a
parentda2ffc7ea5e57daecfe19a65831296ccf5f8588e (diff)
downloadredis-py-0be4d2920684345eb52115c7142c39d65356e7d4.tar.gz
Code coverage in travis, and codecov.io badge. (#1180)
-rw-r--r--.travis.yml5
-rw-r--r--README.rst2
2 files changed, 6 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index 1002dbc..cb89070 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,7 +18,10 @@ install:
- pip install -e .
- "if [[ $TEST_PYCODESTYLE == '1' ]]; then pip install pycodestyle; fi"
- "if [[ $TEST_HIREDIS == '1' ]]; then pip install hiredis; fi"
-script: "if [[ $TEST_PYCODESTYLE == '1' ]]; then pycodestyle --repeat --show-source --exclude=.venv,.tox,dist,docs,build,*.egg,redis_install .; else python setup.py test; fi"
+ - "if [[ $TEST_PYCODESTYLE != '1' ]]; then pip install codecov coverage; fi"
+script: "if [[ $TEST_PYCODESTYLE == '1' ]]; then pycodestyle --repeat --show-source --exclude=.venv,.tox,dist,docs,build,*.egg,redis_install .; else coverage run setup.py test; fi"
+after_success:
+ - "if [[ $TEST_PYCODESTYLE != '1' ]]; then codecov; fi"
matrix:
include:
- python: 2.7
diff --git a/README.rst b/README.rst
index 8ea31b8..8e9a3bc 100644
--- a/README.rst
+++ b/README.rst
@@ -9,6 +9,8 @@ The Python interface to the Redis key-value store.
:target: https://redis-py.readthedocs.io/en/latest/
.. image:: https://badge.fury.io/py/redis.svg
:target: https://pypi.org/project/redis/
+.. image:: https://codecov.io/gh/andymccurdy/redis-py/branch/master/graph/badge.svg
+ :target: https://codecov.io/gh/andymccurdy/redis-py
Installation
------------