diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b77c6b3 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: python +python: + - "2.7" + +# command to install dependencies +install: + - pip install -r requirements.txt + - cd .. + - 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/. + +# 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/tests/ + +# command to run tests +script: + - cd django-haystack/tests/ + - export PYTHONPATH=`pwd`/..:`pwd` + - django-admin.py test xapian_tests --settings=xapian_settings diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..8fe7986 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +Django==1.6.4 +mock==1.0.1 diff --git a/tests/xapian_settings.py b/tests/xapian_settings.py index d3100c1..58be833 100755 --- a/tests/xapian_settings.py +++ b/tests/xapian_settings.py @@ -1,6 +1,3 @@ -# Copyright (C) 2009, 2010, 2011, 2012 David Sauve -# Copyright (C) 2009, 2010 Trapeze - import os from settings import * diff --git a/tests/xapian_tests/__init__.py b/tests/xapian_tests/__init__.py index 51c415e..e69de29 100644 --- a/tests/xapian_tests/__init__.py +++ b/tests/xapian_tests/__init__.py @@ -1,2 +0,0 @@ -# Copyright (C) 2009, 2010, 2011, 2012 David Sauve -# Copyright (C) 2009, 2010 Trapeze diff --git a/tests/xapian_tests/tests/__init__.py b/tests/xapian_tests/tests/__init__.py index 2f3d98f..e69de29 100644 --- a/tests/xapian_tests/tests/__init__.py +++ b/tests/xapian_tests/tests/__init__.py @@ -1,9 +0,0 @@ -# Copyright (C) 2009, 2010, 2011, 2012 David Sauve -# Copyright (C) 2009, 2010 Trapeze - -import warnings - -warnings.simplefilter('ignore', Warning) - -from xapian_tests.tests.xapian_query import * -from xapian_tests.tests.xapian_backend import *