|
@@ -1,30 +1,33 @@
|
1
|
1
|
sudo: false
|
2
|
2
|
language: python
|
3
|
|
-python:
|
4
|
|
-# - "3.2"
|
5
|
|
-# - "3.3"
|
6
|
|
- - "3.4"
|
|
3
|
+python: "3.4"
|
|
4
|
+
|
|
5
|
+env:
|
|
6
|
+ - DB=postgres
|
|
7
|
+ - DB=mysql
|
7
|
8
|
|
8
|
9
|
addons:
|
9
|
10
|
postgresql: "9.3"
|
|
11
|
+ mysql: "5.5"
|
10
|
12
|
|
11
|
|
-# command to install dependencies
|
12
|
|
-# Note: there's an echo at the end of pip install. It allows to override the default return code which is not 0
|
13
|
|
-# because some packages need to be ugraded to python3 (invalid python syntax because of python2 source code)
|
14
|
|
-#
|
15
|
|
-# pip install -r is run 2 times in order to really install tgapp-resetpassword (to investigate)
|
16
|
|
-#
|
17
|
13
|
install:
|
18
|
|
- - "cd tracim && python setup.py develop; cd -"
|
19
|
|
- - "pip install -r install/requirements.txt; echo"
|
20
|
|
- - "pip install coveralls"
|
|
14
|
+ - cd tracim && python setup.py develop; cd -
|
|
15
|
+ - pip install -r install/requirements.txt; echo
|
|
16
|
+ - pip install coveralls
|
21
|
17
|
|
22
|
18
|
before_script:
|
23
|
|
- - "psql -c 'create database tracim_test;' -U postgres"
|
24
|
|
- - "cp ${TRAVIS_BUILD_DIR}/tracim/development.ini.base ${TRAVIS_BUILD_DIR}/tracim/development.ini"
|
25
|
|
-# - "cd ${TRAVIS_BUILD_DIR}/tracim && gearbox setup-app -c ${TRAVIS_BUILD_DIR}/tracim/test.ini"
|
26
|
|
- - "cd ${TRAVIS_BUILD_DIR}/tracim && gearbox setup-app"
|
27
|
|
-# - "cd ${TRAVIS_BUILD_DIR}/tracim && gearbox migrate -c ${TRAVIS_BUILD_DIR}/tracim/test.ini upgrade"
|
|
19
|
+ - cp ${TRAVIS_BUILD_DIR}/tracim/development.ini.base ${TRAVIS_BUILD_DIR}/tracim/development.ini
|
|
20
|
+
|
|
21
|
+ - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database tracim_test;' -U postgres; fi"
|
|
22
|
+ - sh -c "if [ '$DB' = 'postgres' ]; then cd ${TRAVIS_BUILD_DIR}/tracim && sed -i \"s/\(sqlalchemy.url *= *\).*/\1postgresql:\/\/postgres:dummy@127.0.0.1:5432\/tracim_test?client_encoding=utf8/\" test.ini; fi"
|
|
23
|
+ - sh -c "if [ '$DB' = 'postgres' ]; then cd ${TRAVIS_BUILD_DIR}/tracim && sed -i \"s/\(sqlalchemy.url *= *\).*/\1postgresql:\/\/postgres:dummy@127.0.0.1:5432\/tracim_test?client_encoding=utf8/\" development.ini; fi"
|
|
24
|
+
|
|
25
|
+ - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE tracim_test;'; fi"
|
|
26
|
+ - sh -c "if [ '$DB' = 'mysql' ]; then cd ${TRAVIS_BUILD_DIR}/tracim && sed -i \"s/\(sqlalchemy.url *= *\).*/\mysql+oursql:\/\/root@localhost\/tracim_test/\" test.ini; fi"
|
|
27
|
+ - sh -c "if [ '$DB' = 'mysql' ]; then cd ${TRAVIS_BUILD_DIR}/tracim && sed -i \"s/<replace_database_uri_here>/mysql+oursql:\/\/root@localhost\/tracim_test/\" development.ini; fi"
|
|
28
|
+ - sh -c "if [ '$DB' = 'mysql' ]; then pip install https://launchpad.net/oursql/py3k/py3k-0.9.4/+download/oursql-0.9.4.zip; fi"
|
|
29
|
+
|
|
30
|
+ - cd ${TRAVIS_BUILD_DIR}/tracim && gearbox setup-app --debug
|
28
|
31
|
|
29
|
32
|
# command to run tests
|
30
|
33
|
script: "cd ${TRAVIS_BUILD_DIR}/tracim && nosetests -c ${TRAVIS_BUILD_DIR}/tracim/test.ini -v --with-coverage --cover-package=tracim --cover-erase"
|