Skip to content

Commit 291c35b

Browse files
author
revol.cai
committed
codecov travis
1 parent 2cc8e94 commit 291c35b

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

.travis.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,15 @@ services:
1616
services:
1717
- docker
1818

19-
env:
20-
- NODE1=0.0.0.0
21-
2219
before_install:
2320
- docker pull quay.io/coreos/etcd:v3.3
24-
- docker run -d -p 2379:2379 -p 2380:2380 --name etcd3 quay.io/coreos/etcd:v3.3 etcd --name node1 \
25-
--initial-advertise-peer-urls http://${NODE1}:2380 --listen-peer-urls http://${NODE1}:2380 \
26-
--advertise-client-urls http://${NODE1}:2379 --listen-client-urls http://${NODE1}:2379 \
27-
--initial-cluster node1=http://${NODE1}:2380
21+
- docker run -d -p 2379:2379 -p 2380:2380 --name etcd3 quay.io/coreos/etcd:v3.3 etcd --name node1 --initial-advertise-peer-urls http://0.0.0.0:2380 --listen-peer-urls http://0.0.0.0:2380 --advertise-client-urls http://0.0.0.0:2379 --listen-client-urls http://0.0.0.0:2379 --initial-cluster node1=http://0.0.0.0:2380
2822
- docker ps
2923
- sudo docker cp etcd3:/usr/local/bin/etcdctl /usr/bin/etcdctl
3024
- which etcdctl
3125

3226
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
33-
install: pip install -U tox-travis
27+
install: pip install -U tox-travis codecov
3428

3529
# command to run tests, e.g. python setup.py test
3630
script: tox

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ include HISTORY.rst
44
include LICENSE
55
include README.md
66
include requirements*.txt
7+
include *.yml
78

89
recursive-include tests *
910
recursive-include etcd3 *

codecov.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
codecov:
2+
token: 0eef715f-ce0c-451f-bb2f-9f1806d3d95b

requirements_dev.txt

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ coverage>=4.1
1010
mock==2.0.0
1111
PyYAML>=3.11
1212
pytest>=2.9.2
13+
pytest-cov
1314
pytest-runner>=2.11.1
1415
inflection>=0.3.1
1516
isort==4.3.4

tox.ini

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,17 @@ commands =
2828
py.test --basetemp={envtmpdir} --ignore=tests/test_py3/
2929

3030
[testenv]
31+
passenv = TOXENV CI TRAVIS TRAVIS_*
3132
setenv =
3233
PYTHONPATH = {toxinidir}
3334
LC_ALL=en_US.UTF-8
3435
LANG=en_US.UTF-8
3536
deps =
3637
-r{toxinidir}/requirements_dev.txt
38+
codecov>=1.4.0
3739
commands =
38-
py.test --basetemp={envtmpdir} -s -v
40+
py.test --basetemp={envtmpdir} -s -v --cov=etcd3/
41+
codecov
3942

4043

4144
; If you want to make tox run the tests with the same versions, create a

0 commit comments

Comments
 (0)