Added travis CI to code.

This commit is contained in:
Jorge C. Leitão 2014-05-11 18:24:57 +02:00
parent 2a0ec53374
commit a7082c9127
5 changed files with 24 additions and 14 deletions

22
.travis.yml Normal file
View File

@ -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

2
requirements.txt Normal file
View File

@ -0,0 +1,2 @@
Django==1.6.4
mock==1.0.1

View File

@ -1,6 +1,3 @@
# Copyright (C) 2009, 2010, 2011, 2012 David Sauve
# Copyright (C) 2009, 2010 Trapeze
import os
from settings import *

View File

@ -1,2 +0,0 @@
# Copyright (C) 2009, 2010, 2011, 2012 David Sauve
# Copyright (C) 2009, 2010 Trapeze

View File

@ -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 *