sudo: true language: ruby rvm: - 2.3 - 2.4 - 2.5 cache: - bundler - apt env: matrix: - MYSQL57=0 MYSQ_PORT=14406 # MySQL 5.6 - MYSQL57=1 MYSQ_PORT=14407 # MySQL 5.7 before_script: - sudo service mysql stop - bundle install - docker-compose up -d - function mysql_ping { mysqladmin -u root -h 127.0.0.1 -P $MYSQ_PORT ping; } - for i in {1..60}; do mysql_ping && break; sleep 1; done script: - bundle exec rake services: - docker addons: apt: packages: - mysql-client-core-5.6 - mysql-client-5.6