language: python python: - 2.7 - 3.4 matrix: allow_failures: - python: 3.4 sudo: false addons: apt: packages: # required for install of xapian-bindings-1.2.16 - libxapian-dev # required for install of 1.3.7 version of xapian - python-sphinx # Required to install pyme - libgpgme11-dev - swig before_install: - cd /tmp # commented out section of xapian installing core and bindings. # install core 1.3.7 as version in trusty deb is 1.2. need 1.3 for python 3. #- curl -s -O https://oligarchy.co.uk/xapian/1.3.7/xapian-core-1.3.7.tar.xz #- tar -Jxvf xapian-core-1.3.7.tar.xz #- cd xapian-core-1.3.7/ #- ./configure && make && sudo make install #- cd /tmp #- curl -s -O https://oligarchy.co.uk/xapian/1.3.7/xapian-bindings-1.3.7.tar.xz #- tar -Jxvf xapian-bindings-1.3.7.tar.xz #- cd xapian-bindings-1.3.7/ #- ./configure --prefix=$VIRTUAL_ENV --with-python && make && make install # the above fails on python 2.7 with: # ImportError: libxapian-1.3.so.8: cannot open shared object file: # No such file or directory # That library is installed by xapian-core-1.3.7 above. My guess # is that the virtualenv is created by travis software before # before_install is called and xapian-core is installed. # So libxapian is not present in the virtualenv python install. # See https://travis-ci.org/roundup-tracker/roundup/builds/406481321 # Install 1.2.16 xapian-bindings compatible with xapian-dev in ubuntu trusty - curl -s -O https://oligarchy.co.uk/xapian/1.2.16/xapian-bindings-1.2.16.tar.xz - tar -Jxvf xapian-bindings-1.2.16.tar.xz - cd xapian-bindings-1.2.16/ - ./configure --prefix=$VIRTUAL_ENV --with-python && make && make install # change back to the checked out repository directory - cd $TRAVIS_BUILD_DIR install: - pip install MySQL-python psycopg2 pytz pyme whoosh - pip install pytest-cov codecov before_script: # set up mysql database - mysql -u root -e 'GRANT ALL ON rounduptest.* TO rounduptest@localhost IDENTIFIED BY "rounduptest";' # set up postgresql database - psql -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" -U postgres # HACK: workaround mysql bug: http://bugs.mysql.com/bug.php?id=74901 # needed for test_mysql.mysqlDBTest.testFilteringSpecialChars - sed -i 's/CREATE DATABASE \%s/CREATE DATABASE \%s COLLATE utf8_general_ci/' roundup/backends/back_mysql.py script: - py.test -v test/ --cov=roundup after_success: - codecov