Added coveralls to travis build.

This commit is contained in:
Jorge C. Leitão 2015-11-11 23:46:24 +01:00
parent 45191f8944
commit e31f6bbce4
3 changed files with 18 additions and 1 deletions

11
.coveragerc Normal file
View file

@ -0,0 +1,11 @@
[report]
exclude_lines =
def __repr__
raise NotImplementedError
raise MissingDependency
except xapian.DatabaseModifiedError
[run]
source =
haystack/backends/xapian_backend.py
test_haystack/xapian_tests

View file

@ -14,14 +14,18 @@ install:
- git clone https://github.com/toastdriven/django-haystack.git
- sudo apt-get install -qq libxapian22 xapian-tools python-xapian
- ln -s /usr/lib/python2.7/dist-packages/xapian $VIRTUAL_ENV/lib/python2.7/site-packages/.
- pip install coveralls
# move xapian-haystack to django-haystack
before_script:
- cp xapian-haystack/xapian_backend.py django-haystack/haystack/backends
- cp -r xapian-haystack/tests/* django-haystack/test_haystack/
- cp xapian-haystack/tests/xapian_tests/__init__.py django-haystack/test_haystack/
- cp xapian-haystack/.coveragerc django-haystack/
# command to run tests
script:
- cd django-haystack/
- PYTHONPATH=`pwd` django-admin.py test test_haystack.xapian_tests --settings=test_haystack.xapian_settings
- PYTHONPATH=`pwd` coverage run `which django-admin.py` test test_haystack.xapian_tests --settings=test_haystack.xapian_settings
after_success: coveralls

View file

@ -5,6 +5,8 @@ Xapian backend for Django-Haystack
.. image:: https://travis-ci.org/notanumber/xapian-haystack.svg?branch=master
:target: https://travis-ci.org/notanumber/xapian-haystack
.. image:: https://coveralls.io/repos/notanumber/xapian-haystack/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/notanumber/xapian-haystack?branch=master
Xapian-haystack is a backend of `Django-Haystack <http://haystacksearch.org/>`_
for the `Xapian <http://xapian.org>`_ search engine.