dist: trusty
sudo: required

language: php

php:
  - 7.1
  - 7.0
  - 5.6
  - 5.5
  - 5.4
#  - 5.3
  - hhvm
  - nightly

services:
  - mysql

before_script:
  - curl -s http://getcomposer.org/installer | php
  - php composer.phar install
  - sudo service mysql stop || echo "mysql not stopped"
  - echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections
  - wget http://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
  - sudo dpkg --install mysql-apt-config_0.7.3-1_all.deb
  - sudo apt-get update -q
  - sudo apt-get install -q -y --force-yes -o Dpkg::Options::=--force-confnew mysql-server
  - sudo mysql_upgrade
  - sudo service mysql stop || echo "mysql not stopped"
  - sudo mysqld_safe --skip-grant-tables &
  - sleep 4
  - sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"
  - sudo mysqladmin shutdown
  - sleep 1
  - sudo service mysql start
  - mysql -V
  - tests/create_users.sh

script:
  - php src/Ifsnop/Mysqldump/Mysqldump.php
  - cd tests && ./test.sh
