提交 8c7d2da5 编写于 作者: A Andy McCurdy

testing docker-entry

上级 841d5cea
......@@ -12,6 +12,3 @@ services:
script:
- make test
after_success:
- docker-compose run -e CODECOV_TOKEN=$CODECOV_TOKEN test codecov
......@@ -4,4 +4,6 @@ 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
WORKDIR /redis-py
COPY . /redis-py
.PHONY: base clean dev test
base:
docker build -t redis-py-base docker/base
docker build -t redis-py-base docker/base
dev: base
docker-compose up -d --build
dev: base
docker-compose up -d --build
test: dev
docker-compose run --rm test util/wait-for-it.sh master:6379 -- tox -- --redis-url=redis://master:6379/9
test: dev
docker-compose run --rm -e TRAVIS test /redis-py/docker-entry.sh
clean:
docker-compose stop
docker-compose rm -f
docker-compose stop
docker-compose rm -f
......@@ -36,6 +36,8 @@ services:
test:
build: .
working_dir: /redis-py
depends_on:
- "sentinel_3"
environment:
REDIS_MASTER_HOST: master
REDIS_MASTER_PORT: "6379"
#!/bin/sh
# This is the entrypoint for "make clean". 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
codecov
fi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册