Skip to content

Commit

Permalink
Merge pull request #184 from enthought/enh/coverage-report-on-travisci
Browse files Browse the repository at this point in the history
Coverage report on travis-ci
  • Loading branch information
Jonathan Rocher committed Mar 21, 2014
2 parents 3788fa9 + f5ac86c commit 77909fb
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 13 deletions.
21 changes: 21 additions & 0 deletions .coveragerc
@@ -0,0 +1,21 @@
[run]
branch = True
source = chaco
omit = *tests_*, */tests/*

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

if __name__ == .__main__.:

ignore_errors = True
22 changes: 9 additions & 13 deletions .travis.yml
Expand Up @@ -8,25 +8,21 @@ virtualenv:
before_install:
# On Python 2.7 we install PyQt4 and run the UI tests.
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then source .travis_before_install; fi
- sudo apt-get update
- sudo apt-get install python-numpy swig

install:
# nose is already installed
- pip install unittest2
- pip install cython
- sudo apt-get install python-numpy
- sudo apt-get install swig
# Test against the current master of traits, traitsui and enable
- pip install git+http://github.com/enthought/traits.git#egg=traits
- pip install git+http://github.com/enthought/traitsui.git#egg=traitsui
# New version of pip does not install packages that are external to the pypi repositories. Since PIL is external and enable needs PIL,
# to install we have to tell pip to specifically allow PIL to be installed.
- pip install PIL --allow-external PIL --allow-unverified PIL
- pip install git+http://github.com/enthought/enable.git#egg=enable
- pip install coveralls
- pip install -r dev_requirements.txt
- python setup.py develop
script:
# Running all tests in chaco/tests and chaco/tests2
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then nosetests -v chaco; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then coverage run -m nose.core -v chaco; fi
# FIXME: tricky to install PyQt for version <= 2.6, only running chaco/tests
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then nosetests -v chaco/tests; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then coverage run -m nose.core -v chaco/tests; fi
notifications:
email:
- travis-ci@enthought.com
after_success:
coveralls
6 changes: 6 additions & 0 deletions README.rst
Expand Up @@ -8,6 +8,12 @@ http://github.enthought.com/chaco
:target: https://travis-ci.org/enthought/chaco
:alt: Build status


.. image:: https://coveralls.io/repos/enthought/chaco/badge.png?branch=feature%2Fcoverall_badge
:target: https://coveralls.io/r/enthought/chaco?branch=feature%2Fcoverall_badge
:alt: Test coverage


Chaco is a Python plotting application toolkit that facilitates writing
plotting applications at all levels of complexity, from simple scripts with
hard-coded data to large plotting programs with complex data interrelationships
Expand Down
7 changes: 7 additions & 0 deletions dev_requirements.txt
@@ -0,0 +1,7 @@
--allow-external PIL
--allow-unverified PIL
unittest2
coverage
-e git+http://github.com/enthought/traits.git#egg=traits
-e git+http://github.com/enthought/traitsui.git#egg=traitsui
-e git+http://github.com/enthought/enable.git#egg=enable

0 comments on commit 77909fb

Please sign in to comment.