Mercurial > p > roundup > code
diff .travis.yml @ 5003:a9e0ef739241
Add .travis.yml
The .travis.yml file can be used to run the tests with TravisCI[1] for
those developers who use GitHub to host their personal development
branches.
[1] http://travis-ci.org/
| author | John Kristensen <john@jerrykan.com> |
|---|---|
| date | Sat, 10 Oct 2015 23:07:17 +1100 |
| parents | |
| children | 80b87ff8057b |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.travis.yml Sat Oct 10 23:07:17 2015 +1100 @@ -0,0 +1,45 @@ +language: python +python: + - 2.6 + - 2.7 + +sudo: false + +addons: + apt: + packages: + # Required to build/install the xapian-binding + - libxapian-dev + # Required to install pyme + - libgpgme11-dev + - swig + +before_install: + - cd /tmp + - wget -q http://oligarchy.co.uk/xapian/1.2.8/xapian-bindings-1.2.8.tar.gz + - tar -zxvf xapian-bindings-1.2.8.tar.gz + - cd xapian-bindings-1.2.8/ + - ./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 + + # includes a patch for python 2.6 support + - pip install git+https://bitbucket.org/malb/pyme.git@459f3eca65#egg=pyme + +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: + python run_tests.py -v
