Run tests on multiple Python versions and databases (#424)

* Test against more python versions

* Add testing on MySQL

* Add testing on PostgreSQL
This commit is contained in:
Raphael Michel
2017-03-02 11:59:09 +01:00
committed by GitHub
parent b6f42ecd6d
commit af4a2c7184
6 changed files with 62 additions and 19 deletions

View File

@@ -4,6 +4,16 @@ set -x
echo "Executing job $1"
if [ "$PRETIX_CONFIG_FILE" == "tests/travis_mysql.cfg" ]; then
mysql -u root -e 'CREATE DATABASE pretix DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'
pip3 install -Ur src/requirements/mysql.txt
fi
if [ "$PRETIX_CONFIG_FILE" == "tests/travis_postgres.cfg" ]; then
psql -c 'create database travis_ci_test;' -U postgres
pip3 install -Ur src/requirements/postgres.txt
fi
if [ "$1" == "style" ]; then
XDG_CACHE_HOME=/cache pip3 install -Ur src/requirements.txt -r src/requirements/dev.txt -r src/requirements/py34.txt
cd src