Skip to content

Commit

Permalink
Add coverage analysis + support for coveralls.io.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Apr 16, 2018
1 parent 964d096 commit db0822f
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .coveragerc
@@ -1,2 +1,7 @@
[run]
branch = True
source = src

[report]
precision = 2
show_missing = True
1 change: 1 addition & 0 deletions .gitignore
@@ -1,6 +1,7 @@
bin
build
dist
htmlcov/
lib
parts

Expand Down
5 changes: 4 additions & 1 deletion .travis.yml
Expand Up @@ -11,10 +11,13 @@ install:
- pip install six==1.10.0 # force to avoid conflict with zc.recipe.testrunner
- pip install -U setuptools==33.1.1
- pip install zc.buildout
- pip install coveralls coverage
- buildout bootstrap
- buildout
script:
- bin/test -v1
- coverage run bin/test -v1
after_success:
- coveralls
notifications:
email: false
cache:
Expand Down
21 changes: 19 additions & 2 deletions tox.ini
Expand Up @@ -9,17 +9,21 @@ envlist =
py36,
py36-pure,
pypy,
pypy3
pypy3,
coverage-report,

[testenv]
commands =
{envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} bootstrap
{envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir}
{envbindir}/test {posargs:-vc1}
coverage run {envbindir}/test {posargs:-vc1}
skip_install = true
deps =
setuptools==33.1.1
zc.buildout
coverage
setenv =
COVERAGE_FILE=.coverage.{envname}

[testenv:py27-pure]
basepython =
Expand All @@ -44,3 +48,16 @@ basepython =
python3.6
setenv =
PURE_PYTHON = 1

[testenv:coverage-report]
basepython = python3.6
deps = coverage
setenv =
COVERAGE_FILE=.coverage
skip_install = true
commands =
coverage erase
coverage combine
coverage html -i
coverage xml -i
coverage report -i --fail-under=97

0 comments on commit db0822f

Please sign in to comment.