Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (36 sloc) 1.32 KB
language: python
cache: pip
python:
- 3.5
- 3.6
addons:
mariadb: '10.1'
postgresql: '9.6'
env:
- DB=mysql
- DB=postgres
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y libmariadbd-dev libmariadbclient-dev
install:
- pip install --upgrade pip setuptools wheel
- pip install -e .
- pip install mysqlclient psycopg2-binary coveralls
before_script:
- sh -c "cp testing/config/settings/$DB.py testing/config/settings/local.py; fi"
- mkdir testing/log testing/download
- mysql -e "CREATE USER daiquiri_app@localhost IDENTIFIED BY 'daiquiri_app';"
- mysql -e "CREATE USER daiquiri_data@localhost IDENTIFIED BY 'daiquiri_data';"
- mysql -e "GRANT ALL PRIVILEGES ON test_daiquiri_app.* TO daiquiri_app@localhost;"
- mysql < testing/sql/mysql.sql
- psql -U postgres -c "CREATE USER daiquiri_app WITH PASSWORD 'daiquiri_app';"
- psql -U postgres -c "CREATE USER daiquiri_data WITH PASSWORD 'daiquiri_data';"
- psql -U postgres -c "CREATE DATABASE test_daiquiri_app OWNER daiquiri_app;"
- psql -U postgres -c "CREATE DATABASE test_daiquiri_data OWNER daiquiri_data;"
- psql -U postgres -f testing/sql/postgres.sql test_daiquiri_data
- psql -U postgres -f testing/sql/postgres.sql test_daiquiri_data
- psql -U postgres -c "VACUUM ANALYZE;" test_daiquiri_data
script:
- coverage run testing/runtests.py -k
after_success:
- coveralls