summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2020-07-20 13:51:40 -0700
committerAndy McCurdy <andy@andymccurdy.com>2020-07-20 13:51:40 -0700
commit458ded5ece062a961cd7093933b3ed68e4e7a6c4 (patch)
treef379cd103fa8fe538731b6b188e305347b85f61e
parentf24b7f2b66172f9df7143b57d324ffb41bca979b (diff)
downloadredis-py-458ded5ece062a961cd7093933b3ed68e4e7a6c4.tar.gz
run the codecov env by default and disable when running outside Travis
-rwxr-xr-xdocker-entry.sh12
-rw-r--r--tox.ini2
2 files changed, 8 insertions, 6 deletions
diff --git a/docker-entry.sh b/docker-entry.sh
index efcd205..f63a8c5 100755
--- a/docker-entry.sh
+++ b/docker-entry.sh
@@ -1,17 +1,19 @@
#!/bin/bash
# This is the entrypoint for "make test". It invokes Tox. If running
-# within the CI environment, it also runs codecov
+# outside the CI environment, it disables uploading the coverage report to codecov
set -eu
REDIS_MASTER="${REDIS_MASTER_HOST}":"${REDIS_MASTER_PORT}"
echo "Testing against Redis Server: ${REDIS_MASTER}"
+# skip the "codecov" env if not running on Travis
+if [ -z ${TRAVIS-} ]; then
+ echo "Skipping codecov"
+ export TOX_SKIP_ENV="codecov"
+fi
+
# use the wait-for-it util to ensure the server is running before invoking Tox
util/wait-for-it.sh ${REDIS_MASTER} -- tox -- --redis-url=redis://"${REDIS_MASTER}"/9
-# if the TRAVIS env var is defined, invoke "codecov"
-if [ ! -z ${TRAVIS-} ]; then
- tox -e codecov
-fi
diff --git a/tox.ini b/tox.ini
index 3007f11..d1d97f4 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,7 +3,7 @@ addopts = -s
[tox]
minversion = 2.4
-envlist = {py27,py35,py36,py37,py38,pypy,pypy3}-{plain,hiredis}, flake8, covreport
+envlist = {py27,py35,py36,py37,py38,pypy,pypy3}-{plain,hiredis}, flake8, covreport, codecov
[testenv]
deps =