Skip to content

Commit

Permalink
codecov travis
Browse files Browse the repository at this point in the history
  • Loading branch information
revol.cai committed Mar 15, 2018
1 parent 2cc8e94 commit 291c35b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
10 changes: 2 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,15 @@ services:
services:
- docker

env:
- NODE1=0.0.0.0

before_install:
- docker pull quay.io/coreos/etcd:v3.3
- 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://${NODE1}:2380 --listen-peer-urls http://${NODE1}:2380 \
--advertise-client-urls http://${NODE1}:2379 --listen-client-urls http://${NODE1}:2379 \
--initial-cluster node1=http://${NODE1}:2380
- 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
- docker ps
- sudo docker cp etcd3:/usr/local/bin/etcdctl /usr/bin/etcdctl
- which etcdctl

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

# command to run tests, e.g. python setup.py test
script: tox
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ include HISTORY.rst
include LICENSE
include README.md
include requirements*.txt
include *.yml

recursive-include tests *
recursive-include etcd3 *
Expand Down
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
codecov:
token: 0eef715f-ce0c-451f-bb2f-9f1806d3d95b
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ coverage>=4.1
mock==2.0.0
PyYAML>=3.11
pytest>=2.9.2
pytest-cov
pytest-runner>=2.11.1
inflection>=0.3.1
isort==4.3.4
Expand Down
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ commands =
py.test --basetemp={envtmpdir} --ignore=tests/test_py3/

[testenv]
passenv = TOXENV CI TRAVIS TRAVIS_*
setenv =
PYTHONPATH = {toxinidir}
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
deps =
-r{toxinidir}/requirements_dev.txt
codecov>=1.4.0
commands =
py.test --basetemp={envtmpdir} -s -v
py.test --basetemp={envtmpdir} -s -v --cov=etcd3/
codecov


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

0 comments on commit 291c35b

Please sign in to comment.