Update travis CI file to test agains different databases, add travis DB setting files
This commit is contained in:
+11
-1
@@ -8,15 +8,25 @@ python:
|
|||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- TEST_APPS="document_indexing documents dynamic_search lock_manager document_signatures folders ocr tags"
|
- TEST_APPS="document_indexing documents dynamic_search lock_manager document_signatures folders ocr tags"
|
||||||
|
matrix:
|
||||||
|
- DB=mysql
|
||||||
|
- DB=postgres
|
||||||
|
- DB=sqlite
|
||||||
before_install:
|
before_install:
|
||||||
- sudo apt-get update -qq
|
- sudo apt-get update -qq
|
||||||
- sudo apt-get install -qq python-dev gcc tesseract-ocr unpaper ghostscript libjpeg-dev libpng-dev poppler-utils
|
- sudo apt-get install -qq python-dev gcc tesseract-ocr unpaper ghostscript libjpeg-dev libpng-dev poppler-utils
|
||||||
install:
|
install:
|
||||||
- "pip install -r requirements/testing.txt"
|
- "pip install -r requirements/testing.txt"
|
||||||
|
- if [[ $DB == mysql ]]; then pip install -q mysql-python; fi
|
||||||
|
- if [[ $DB == postgres ]]; then pip install -q psycopg2; fi
|
||||||
before_script:
|
before_script:
|
||||||
|
- mysql -e 'create database mayan_edms;'
|
||||||
|
- psql -c 'create database mayan_edms;' -U postgres
|
||||||
- "python manage.py initialsetup"
|
- "python manage.py initialsetup"
|
||||||
script:
|
script:
|
||||||
- coverage run manage.py test $TEST_APPS
|
- if [[ $DB == mysql ]]; then coverage run manage.py test $TEST_APPS --settings=mayan.settings.travis.db_mysql; fi
|
||||||
|
- if [[ $DB == postgres ]]; then coverage run manage.py test $TEST_APPS --settings=mayan.settings.travis.db_postgres; fi
|
||||||
|
- if [[ $DB == sqlite ]]; then coverage run manage.py test $TEST_APPS; fi
|
||||||
after_success:
|
after_success:
|
||||||
- coveralls
|
- coveralls
|
||||||
branches:
|
branches:
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
|
from .. import *
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
'default': {
|
||||||
|
'ENGINE': 'django.db.backends.mysql',
|
||||||
|
'NAME': 'mayan_edms',
|
||||||
|
'USER': 'travis',
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
|
from .. import *
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
'default': {
|
||||||
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||||
|
'NAME': 'mayan_edms',
|
||||||
|
'USER': 'postgres',
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user