Use the unified test management command for continious integration.
This commit is contained in:
+3
-4
@@ -10,14 +10,13 @@ variables:
|
|||||||
POSTGRES_PASSWORD: "postgres"
|
POSTGRES_PASSWORD: "postgres"
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
|
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
|
||||||
MYSQL_DATABASE: "mayan_edms"
|
MYSQL_DATABASE: "mayan_edms"
|
||||||
MAYAN_TEST_APPS: "acls authentication checkouts django_gpg document_indexing document_signatures documents dynamic_search folders lock_manager metadata ocr permissions sources tags"
|
|
||||||
test:mysql:
|
test:mysql:
|
||||||
script:
|
script:
|
||||||
- pip install -r requirements/testing.txt
|
- pip install -r requirements/testing.txt
|
||||||
- pip install -q mysql-python
|
- pip install -q mysql-python
|
||||||
- apt-get install -qq mysql-client
|
- apt-get install -qq mysql-client
|
||||||
- mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD" -e "ALTER DATABASE $MYSQL_DATABASE CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
|
- mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD" -e "ALTER DATABASE $MYSQL_DATABASE CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
|
||||||
- coverage run manage.py test $MAYAN_TEST_APPS --settings=mayan.settings.testing.gitlab-ci.db_mysql --nomigrations
|
- coverage run manage.py runtests --settings=mayan.settings.testing.gitlab-ci.db_mysql --nomigrations
|
||||||
- bash <(curl https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -t $CODECOV_TOKEN
|
- bash <(curl https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -t $CODECOV_TOKEN
|
||||||
tags:
|
tags:
|
||||||
- mysql
|
- mysql
|
||||||
@@ -25,12 +24,12 @@ test:postgres:
|
|||||||
script:
|
script:
|
||||||
- pip install -r requirements/testing.txt
|
- pip install -r requirements/testing.txt
|
||||||
- pip install -q psycopg2
|
- pip install -q psycopg2
|
||||||
- coverage run manage.py test $MAYAN_TEST_APPS --settings=mayan.settings.testing.gitlab-ci.db_postgres --nomigrations
|
- coverage run manage.py runtests --settings=mayan.settings.testing.gitlab-ci.db_postgres --nomigrations
|
||||||
- bash <(curl https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -t $CODECOV_TOKEN
|
- bash <(curl https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -t $CODECOV_TOKEN
|
||||||
tags:
|
tags:
|
||||||
- postgres
|
- postgres
|
||||||
test:sqlite:
|
test:sqlite:
|
||||||
script:
|
script:
|
||||||
- pip install -r requirements/testing.txt
|
- pip install -r requirements/testing.txt
|
||||||
- coverage run manage.py test $MAYAN_TEST_APPS --settings=mayan.settings.testing.gitlab-ci --nomigrations
|
- coverage run manage.py runtests --settings=mayan.settings.testing.gitlab-ci --nomigrations
|
||||||
- bash <(curl https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -t $CODECOV_TOKEN
|
- bash <(curl https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -t $CODECOV_TOKEN
|
||||||
|
|||||||
+3
-5
@@ -2,8 +2,6 @@ language: python
|
|||||||
python:
|
python:
|
||||||
- 2.7
|
- 2.7
|
||||||
env:
|
env:
|
||||||
global:
|
|
||||||
- TEST_APPS="acls authentication checkouts django_gpg document_indexing document_signatures documents dynamic_search folders lock_manager metadata ocr permissions sources tags"
|
|
||||||
matrix:
|
matrix:
|
||||||
- DB=mysql
|
- DB=mysql
|
||||||
- DB=postgres
|
- DB=postgres
|
||||||
@@ -19,9 +17,9 @@ before_script:
|
|||||||
- mysql -e 'create database mayan_edms;'
|
- mysql -e 'create database mayan_edms;'
|
||||||
- psql -c 'create database mayan_edms;' -U postgres
|
- psql -c 'create database mayan_edms;' -U postgres
|
||||||
script:
|
script:
|
||||||
- if [[ $DB == mysql ]]; then coverage run manage.py test $TEST_APPS --settings=mayan.settings.testing.travis.db_mysql --nomigrations; fi
|
- if [[ $DB == mysql ]]; then coverage run manage.py runtests --settings=mayan.settings.testing.travis.db_mysql --nomigrations; fi
|
||||||
- if [[ $DB == postgres ]]; then coverage run manage.py test $TEST_APPS --settings=mayan.settings.testing.travis.db_postgres --nomigrations; fi
|
- if [[ $DB == postgres ]]; then coverage run manage.py runtests --settings=mayan.settings.testing.travis.db_postgres --nomigrations; fi
|
||||||
- if [[ $DB == sqlite ]]; then coverage run manage.py test $TEST_APPS --settings=mayan.settings.testing.base --nomigrations; fi
|
- if [[ $DB == sqlite ]]; then coverage run manage.py runtests --settings=mayan.settings.testing.base --nomigrations; fi
|
||||||
after_success:
|
after_success:
|
||||||
- coveralls
|
- coveralls
|
||||||
branches:
|
branches:
|
||||||
|
|||||||
Reference in New Issue
Block a user