Skip to content

Commit 4e32e4d

Browse files
authored
Merge pull request #617 from ceache/feat/build_coverage
Feat/build coverage
2 parents 4e86132 + 6994251 commit 4e32e4d

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ language: python
1414
jobs:
1515
include:
1616
- python: '3.7'
17-
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py37-gevent-eventlet-sasl
17+
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py37-gevent-eventlet-sasl,codecov
1818
- python: '3.7'
19-
env: ZOOKEEPER_VERSION=3.5.8 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py37-gevent-eventlet-sasl
19+
env: ZOOKEEPER_VERSION=3.5.8 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py37-gevent-eventlet-sasl,codecov
2020
- python: '3.8'
21-
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py38-gevent-eventlet-sasl
21+
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py38-gevent-eventlet-sasl,codecov
2222
- python: '3.8'
23-
env: ZOOKEEPER_VERSION=3.5.8 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py38-gevent-eventlet-sasl DEPLOY=true
23+
env: ZOOKEEPER_VERSION=3.5.8 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py38-gevent-eventlet-sasl,codecov DEPLOY=true
2424
- python: 'pypy3'
25-
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=pypy3-gevent-eventlet-sasl
25+
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=pypy3-gevent-eventlet-sasl,codecov
2626
- python: 'pypy3'
27-
env: ZOOKEEPER_VERSION=3.5.8 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=pypy3-gevent-eventlet-sasl
27+
env: ZOOKEEPER_VERSION=3.5.8 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=pypy3-gevent-eventlet-sasl,codecov
2828
notifications:
2929
email: false
3030
install:

requirements_test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ mock
33
objgraph
44
pytest
55
pytest-cov
6+
pytest-xdist

tox.ini

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@ envlist =
77
{gevent,eventlet,sasl,docs},
88
pypy3
99

10-
[testenv:pep8]
11-
commands = flake8 {posargs}
12-
1310
[testenv]
1411
usedevelop = True
1512
install_command = pip install {opts} {packages}
13+
passenv =
14+
CI
15+
TOX_*
16+
TRAVIS
17+
TRAVIS_*
18+
ZOOKEEPER_*
1619
setenv =
1720
VIRTUAL_ENV={envdir}
18-
ZOOKEEPER_VERSION={env:ZOOKEEPER_VERSION:}
19-
ZOOKEEPER_PREFIX={env:ZOOKEEPER_PREFIX:}
20-
ZOOKEEPER_SUFFIX={env:ZOOKEEPER_SUFFIX:}
21-
ZOOKEEPER_LIB={env:ZOOKEEPER_LIB:}
2221
deps =
2322
-c{toxinidir}/constraints.txt
2423
-r{toxinidir}/requirements.txt
@@ -28,10 +27,18 @@ deps =
2827
eventlet: -r{toxinidir}/requirements_eventlet.txt
2928
sasl: -r{toxinidir}/requirements_sasl.txt
3029
sasl: kerberos
30+
codecov: codecov
3131
commands =
3232
sasl: {toxinidir}/init_krb5.sh {envtmpdir}/kerberos \
3333
/{toxinidir}/ensure-zookeeper-env.sh \
34-
pytest {posargs: -ra -v --cov=kazoo kazoo/tests}
34+
pytest {posargs: -ra -v --cov-report=xml --cov=kazoo kazoo/tests}
35+
36+
[testenv:codecov]
37+
commands = - codecov -e TOX_VENV,ZOOKEEPER_VERSION
38+
39+
[testenv:pep8]
40+
commands = flake8 {posargs}
41+
3542

3643
[flake8]
3744
builtins = _

0 commit comments

Comments
 (0)