.travis.yml in gratan-0.3.1.beta2 vs .travis.yml in gratan-0.3.1.beta3

- old
+ new

@@ -1,26 +1,28 @@ sudo: true language: ruby rvm: - - 2.0.0 - - 2.1 - - 2.2 -script: + - 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 -env: - - MYSQL_VERSION=5.6.27 -before_install: - - gem update bundler -install: - - "sudo apt-get -y remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5" - - "sudo apt-get -y autoremove" - - "sudo apt-get -y install libaio1" - - "wget -O mysql-$MYSQL_VERSION.deb http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-$MYSQL_VERSION-debian6.0-x86_64.deb/from/http://cdn.mysql.com/" - - "sudo dpkg -i mysql-$MYSQL_VERSION.deb" - - "sudo cp -f /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server" - - "sudo ln -sf /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 sed -i'' 's/^socket *=.*$/socket = \\/tmp\\/mysql.sock/' /etc/mysql/my.cnf" - - "sudo /etc/init.d/mysql.server start" +services: + - docker +addons: + apt: + packages: + - mysql-client-core-5.6 + - mysql-client-5.6