language: python dist: xenial sudo: false python: - 2.7 - 3.5 - 3.6 - 3.7 - 3.8 addons: postgresql: 9.6 services: - mysql - postgresql env: matrix: - PW_TEST_DB_TYPE=postgres PW_TEST_DB_USER=postgres - PW_TEST_DB_TYPE=mysql PW_TEST_DB_USER=root global: - PW_TEST_DB_PASS="" - PW_TEST_DB_HOST="localhost" matrix: include: - addons: mariadb: 10.3 env: - PW_TEST_DB_TYPE=mysql - PW_TEST_DB_USER=root - addons: postgresql: 10 env: - PW_TEST_DB_TYPE=postgres - PW_TEST_DB_USER=postgres python: 3.7 before_script: - if [[ $PW_TEST_DB_TYPE == mysql ]]; then mysql -e "create database patchwork character set utf8;"; fi - if [[ $PW_TEST_DB_TYPE == postgres ]]; then psql -c "create database patchwork with ENCODING = 'UTF8';" -U $PW_TEST_DB_USER; fi install: - pip install tox-travis - pip install codecov script: - > if [[ $PW_TEST_DB_TYPE == mysql ]]; then mysql -e "SELECT VERSION(), CURRENT_USER();" -u $PW_TEST_DB_USER patchwork; else psql -c "SELECT VERSION(), CURRENT_USER, current_database()" -U $PW_TEST_DB_USER patchwork; fi - tox after_success: - codecov