diff options
-rwxr-xr-x | docker-entry.sh | 12 | ||||
-rw-r--r-- | tox.ini | 2 |
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 @@ -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 = |