forked from RDFLib/rdflib-sqlalchemy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
31 lines (31 loc) · 1.33 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# http://travis-ci.org/#!/gjhiggins/rdflib-sqlalchemy
language: python
branches:
only:
- master
env:
- DB=pgsql
- DB=mysql
- DB=sqlite
python:
- "2.5"
- "2.6"
- "2.7"
- "3.2"
- "3.3"
install:
- if [[ ${TRAVIS_PYTHON_VERSION} == '2.5' ]]; then pip install simplejson==2.0.9; fi
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '2' ]]; then pip install -r requirements-py2.txt --use-mirrors; fi
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '3' ]]; then pip install -r requirements-py3.txt --use-mirrors; fi
- if [[ ${TRAVIS_PYTHON_VERSION} == 'pypy' ]]; then pip install --upgrade 'git+https://github.com/gjhiggins/isodate#egg=isodate'; fi
- python setup.py install
before_script:
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS rdflibsqla_test;' -U postgres; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database rdflibsqla_test;' -U postgres; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS rdflibsqla_test'; fi"
script:
# Must cd somewhere else so python3 doesn't get confused and run
# the python2 code from the current directory instead of the installed
# 2to3 version.
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '2' ]]; then nosetests; fi
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '3' ]]; then nosetests --where=./build/src; fi