language: php
php:
  - 5.6
  - 7
mysql:
  database: activecollab_database_object_test
  username: root
  encoding: utf8mb4
before_install:
  # INSTALL MYSQL 5.6
  # (https://github.com/piwik/piwik/commit/20bd2e1c24e5d673dce3feb256204ad48c29f160)
  # TODO: Remove when mysql 5.6 is provided by travis.
  # Otherwise, our migrations will raise a syntax error.
  - "sudo apt-get remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5"
  - "sudo apt-get autoremove"
  - "sudo apt-get install libaio1"
  - "wget -O mysql-5.6.14.deb http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.14-debian6.0-x86_64.deb/from/http://cdn.mysql.com/"
  - "sudo dpkg -i mysql-5.6.14.deb"
  - "sudo cp /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server"
  - "sudo ln -s /opt/mysql/server-5.6/bin/* /usr/bin/"
  - "sudo sed -i'' 's/table_cache/table_open_cache/' /etc/mysql/my.cnf"
  - "sudo sed -i'' 's/log_slow_queries/slow_query_log/' /etc/mysql/my.cnf"
  - "sudo sed -i'' 's/basedir[^=]\\+=.*$/basedir = \\/opt\\/mysql\\/server-5.6/' /etc/mysql/my.cnf"
  - "sudo /etc/init.d/mysql.server start"
  - mysql --version
  - mysql -e "SELECT VERSION();"
  # /END MYSQL 5.6
  - composer self-update
install: composer install --dev
before_script:
  - mysql -e 'create database activecollab_database_object_test'
script: phpunit -c test/phpunit.xml

dist: trusty
sudo: required
language: php
php:
  - 5.6
  - 7
addons:
  apt:
    packages:
    - mysql-server-5.6
    - mysql-client-core-5.6
    - mysql-client-5.6
mysql:
  database: activecollab_database_object_test
  username: root
  encoding: utf8mb4
before_install:
  - composer self-update
install: composer install --dev
before_script:
  - mysql -u root -e 'create database activecollab_database_object_test'
script: phpunit -c test/phpunit.xml

Use recommended way to get MySQL 5.6 on Travis
Use recommended way to get MySQL 5.6 on Travis
