summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Brookins <andrew.brookins@redislabs.com>2020-07-17 19:27:40 +0000
committerAndrew Brookins <andrew.brookins@redislabs.com>2020-07-17 19:27:40 +0000
commit7da4b55a2831db4d0d0da616322fd491ddb9c3d6 (patch)
tree573887ab4109ce4c789ef3d59b54248cc8232c8d
parentd878df7280be7c4365ee1522d23f37d961735257 (diff)
downloadredis-py-7da4b55a2831db4d0d0da616322fd491ddb9c3d6.tar.gz
Try running codecov from tox
-rw-r--r--.gitignore1
-rw-r--r--Dockerfile4
-rwxr-xr-xdocker-entry.sh2
-rw-r--r--tox.ini16
4 files changed, 18 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index a9b1017..b59bcdf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@ vagrant/.vagrant
.coverage
env
venv
+coverage.xml
diff --git a/Dockerfile b/Dockerfile
index 3bcc3ec..eba66f0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,8 +1,6 @@
FROM fkrull/multi-python:latest
-RUN apt update && apt install -y pypy pypy-dev pypy3-dev curl
-RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.8 get-pip.py
-RUN pip install codecov
+RUN apt update && apt install -y pypy pypy-dev pypy3-dev
WORKDIR /redis-py
diff --git a/docker-entry.sh b/docker-entry.sh
index e05cc22..efcd205 100755
--- a/docker-entry.sh
+++ b/docker-entry.sh
@@ -13,5 +13,5 @@ util/wait-for-it.sh ${REDIS_MASTER} -- tox -- --redis-url=redis://"${REDIS_MASTE
# if the TRAVIS env var is defined, invoke "codecov"
if [ ! -z ${TRAVIS-} ]; then
- codecov
+ tox -e codecov
fi
diff --git a/tox.ini b/tox.ini
index 30682fb..0a01fef 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[pytest]
-addopts = -s
+addopts = -s --cov-report=term-missing --cov redis
[tox]
minversion = 2.4
@@ -10,6 +10,7 @@ deps =
coverage
mock
pytest >= 2.7.0
+ pytest-cov >= 2.10.0
extras =
hiredis: hiredis
commands = {envpython} -b -m coverage run -m pytest -W always {posargs}
@@ -32,3 +33,16 @@ basepython = pypy3
[testenv:pypy3-hiredis]
basepython = pypy3
+
+[testenv:codecov]
+deps = codecov
+commands = codecov
+passenv =
+ REDIS_*
+ CI
+ CI_*
+ CODECOV_*
+ SHIPPABLE
+ TRAVIS
+ TRAVIS_*
+ VCS_*