Skip to content

Commit 7da4b55

Browse files
author
Andrew Brookins
committed
Try running codecov from tox
1 parent d878df7 commit 7da4b55

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ vagrant/.vagrant
1313
.coverage
1414
env
1515
venv
16+
coverage.xml

Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
FROM fkrull/multi-python:latest
22

3-
RUN apt update && apt install -y pypy pypy-dev pypy3-dev curl
4-
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.8 get-pip.py
5-
RUN pip install codecov
3+
RUN apt update && apt install -y pypy pypy-dev pypy3-dev
64

75
WORKDIR /redis-py
86

docker-entry.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ util/wait-for-it.sh ${REDIS_MASTER} -- tox -- --redis-url=redis://"${REDIS_MASTE
1313

1414
# if the TRAVIS env var is defined, invoke "codecov"
1515
if [ ! -z ${TRAVIS-} ]; then
16-
codecov
16+
tox -e codecov
1717
fi

tox.ini

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[pytest]
2-
addopts = -s
2+
addopts = -s --cov-report=term-missing --cov redis
33

44
[tox]
55
minversion = 2.4
@@ -10,6 +10,7 @@ deps =
1010
coverage
1111
mock
1212
pytest >= 2.7.0
13+
pytest-cov >= 2.10.0
1314
extras =
1415
hiredis: hiredis
1516
commands = {envpython} -b -m coverage run -m pytest -W always {posargs}
@@ -32,3 +33,16 @@ basepython = pypy3
3233

3334
[testenv:pypy3-hiredis]
3435
basepython = pypy3
36+
37+
[testenv:codecov]
38+
deps = codecov
39+
commands = codecov
40+
passenv =
41+
REDIS_*
42+
CI
43+
CI_*
44+
CODECOV_*
45+
SHIPPABLE
46+
TRAVIS
47+
TRAVIS_*
48+
VCS_*

0 commit comments

Comments
 (0)