Skip to content

Commit

Permalink
chore(tests): Add coverage report on codecov.io
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles-Henri de Boysson authored and ceache committed Jun 21, 2020
1 parent 522189d commit bb47584
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ language: python
jobs:
include:
- python: '3.7'
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py37-gevent-eventlet-sasl
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py37-gevent-eventlet-sasl,codecov
- python: '3.7'
env: ZOOKEEPER_VERSION=3.5.8 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py37-gevent-eventlet-sasl
env: ZOOKEEPER_VERSION=3.5.8 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py37-gevent-eventlet-sasl,codecov
- python: '3.8'
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py38-gevent-eventlet-sasl
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py38-gevent-eventlet-sasl,codecov
- python: '3.8'
env: ZOOKEEPER_VERSION=3.5.8 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py38-gevent-eventlet-sasl DEPLOY=true
env: ZOOKEEPER_VERSION=3.5.8 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py38-gevent-eventlet-sasl,codecov DEPLOY=true
- python: 'pypy3'
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=pypy3-gevent-eventlet-sasl
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=pypy3-gevent-eventlet-sasl,codecov
- python: 'pypy3'
env: ZOOKEEPER_VERSION=3.5.8 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=pypy3-gevent-eventlet-sasl
env: ZOOKEEPER_VERSION=3.5.8 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=pypy3-gevent-eventlet-sasl,codecov
notifications:
email: false
install:
Expand Down
1 change: 1 addition & 0 deletions requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ mock
objgraph
pytest
pytest-cov
pytest-xdist
23 changes: 15 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@ envlist =
{gevent,eventlet,sasl,docs},
pypy3

[testenv:pep8]
commands = flake8 {posargs}

[testenv]
usedevelop = True
install_command = pip install {opts} {packages}
passenv =
CI
TOX_*
TRAVIS
TRAVIS_*
ZOOKEEPER_*
setenv =
VIRTUAL_ENV={envdir}
ZOOKEEPER_VERSION={env:ZOOKEEPER_VERSION:}
ZOOKEEPER_PREFIX={env:ZOOKEEPER_PREFIX:}
ZOOKEEPER_SUFFIX={env:ZOOKEEPER_SUFFIX:}
ZOOKEEPER_LIB={env:ZOOKEEPER_LIB:}
deps =
-c{toxinidir}/constraints.txt
-r{toxinidir}/requirements.txt
Expand All @@ -28,10 +27,18 @@ deps =
eventlet: -r{toxinidir}/requirements_eventlet.txt
sasl: -r{toxinidir}/requirements_sasl.txt
sasl: kerberos
codecov: codecov
commands =
sasl: {toxinidir}/init_krb5.sh {envtmpdir}/kerberos \
/{toxinidir}/ensure-zookeeper-env.sh \
pytest {posargs: -ra -v --cov=kazoo kazoo/tests}
pytest {posargs: -ra -v --cov-report=xml --cov=kazoo kazoo/tests}

[testenv:codecov]
commands = - codecov -e TOX_VENV,ZOOKEEPER_VERSION

[testenv:pep8]
commands = flake8 {posargs}


[flake8]
builtins = _
Expand Down

0 comments on commit bb47584

Please sign in to comment.