Skip to content

Commit

Permalink
Added coveralls to travis build.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed Nov 11, 2015
1 parent 45191f8 commit e31f6bb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -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
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e31f6bb

Please sign in to comment.