summaryrefslogtreecommitdiff
path: root/docker-entry.sh
blob: efcd20521e66e11984cf92f869d7604f40072511 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# This is the entrypoint for "make test". It invokes Tox. If running
# within the CI environment, it also runs codecov

set -eu

REDIS_MASTER="${REDIS_MASTER_HOST}":"${REDIS_MASTER_PORT}"
echo "Testing against Redis Server: ${REDIS_MASTER}"

# 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