dist: trusty

language: python

matrix:
  include:
    - python: 2.7
    - python: 3.4
    - python: 3.5
    - python: 3.6
    - python: 3.7
      dist: xenial
      sudo: true
    - python: pypy
      env: OPTIONAL=1

  allow_failures:
    - env: OPTIONAL=1

addons:
  mariadb: '10.2'

before_install:
- wget https://github.com/DiamondLightSource/ispyb-database/releases/download/v1.2.0/ispyb-database-1.3.0.tar.gz
- tar xvfz ispyb-database-1.3.0.tar.gz
- mysql_upgrade -u root
- mysql -u root -e "CREATE DATABASE ispybtest; SET GLOBAL log_bin_trust_function_creators=ON;"
- mysql -u root -D ispybtest < schema/tables.sql
- mysql -u root -D ispybtest < schema/lookups.sql
- mysql -u root -D ispybtest < schema/data.sql
- mysql -u root -D ispybtest < schema/routines.sql

before_script:
- cp conf/config.example.cfg conf/config.cfg
- cp conf/ws_config.example.cfg conf/ws_config.cfg

install:
- pip install .
- pip install coveralls

script:
- coverage run --source=ispyb setup.py test
after_success: coveralls

dist: trusty

language: python

matrix:
  include:
    - python: 2.7
    - python: 3.4
    - python: 3.5
    - python: 3.6
    - python: 3.7
      dist: xenial
      sudo: true
    - python: pypy
      env: OPTIONAL=1

  allow_failures:
    - env: OPTIONAL=1

addons:
  mariadb: '10.2'

before_install:
- wget https://github.com/DiamondLightSource/ispyb-database/releases/download/v1.3.0/ispyb-database-1.3.0.tar.gz
- tar xvfz ispyb-database-1.3.0.tar.gz
- mysql_upgrade -u root
- mysql -u root -e "CREATE DATABASE ispybtest; SET GLOBAL log_bin_trust_function_creators=ON;"
- mysql -u root -D ispybtest < schema/tables.sql
- mysql -u root -D ispybtest < schema/lookups.sql
- mysql -u root -D ispybtest < schema/data.sql
- mysql -u root -D ispybtest < schema/routines.sql

before_script:
- cp conf/config.example.cfg conf/config.cfg
- cp conf/ws_config.example.cfg conf/ws_config.cfg

install:
- pip install .
- pip install coveralls

script:
- coverage run --source=ispyb setup.py test
after_success: coveralls

Correct URL for ispyb-database 1.3.0 release
Correct URL for ispyb-database 1.3.0 release
