提交 458ded5e 编写于 作者: A Andy McCurdy

run the codecov env by default and disable when running outside Travis

上级 f24b7f2b
#!/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 =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册