test db-upgrade on travis

This commit is contained in:
Min RK
2017-09-27 19:06:54 +02:00
parent df9e002b9a
commit d3a3b8ca19

View File

@@ -13,6 +13,7 @@ env:
services: services:
- mysql - mysql
- postgresql - postgresql
- docker
# installing dependencies # installing dependencies
before_install: before_install:
@@ -29,12 +30,22 @@ before_install:
fi fi
install: install:
- pip install -U pip - pip install -U pip
- |
if [[ "$TEST" == "db-upgrade" ]]; then
pip install pymysql psycopg2
fi
- pip install --pre -r dev-requirements.txt . - pip install --pre -r dev-requirements.txt .
- pip freeze - pip freeze
# running tests # running tests
script: script:
- pytest -v --maxfail=2 --cov=jupyterhub jupyterhub/tests - |
if [[ "$TEST" == "db-upgrade" ]]; then
cd test-db-upgrade
bash test.sh
else
pytest -v --maxfail=2 --cov=jupyterhub jupyterhub/tests
fi
after_success: after_success:
- codecov - codecov
@@ -47,5 +58,7 @@ matrix:
env: JUPYTERHUB_TEST_DB_URL=mysql+mysqlconnector://root@127.0.0.1/jupyterhub env: JUPYTERHUB_TEST_DB_URL=mysql+mysqlconnector://root@127.0.0.1/jupyterhub
- python: 3.6 - python: 3.6
env: JUPYTERHUB_TEST_DB_URL=postgresql://postgres@127.0.0.1/jupyterhub env: JUPYTERHUB_TEST_DB_URL=postgresql://postgres@127.0.0.1/jupyterhub
- python: 3.6
env: TEST=db-upgrade
allow_failures: allow_failures:
- python: nightly - python: nightly