diff --git a/.travis.yml b/.travis.yml index d668ac135..13fd0ee67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,9 @@ language: ruby bundler_args: --without benchmarks development # Pin Rubygems to a working version. Sometimes it breaks upstream. Update now and then. before_install: - - gem update --system 2.6.4 + - gem --version + - gem update --system 2.6.7 + - gem update bundler - gem --version - bash .travis_setup.sh addons: @@ -12,9 +14,9 @@ addons: - mysql2gem.example.com apt: packages: - - mysql-server-5.5 - - mysql-client-core-5.5 - - mysql-client-5.5 + - mysql-server-5.6 + - mysql-client-core-5.6 + - mysql-client-5.6 rvm: - 2.4.0-preview2 - 2.3.1 @@ -27,10 +29,26 @@ matrix: include: - rvm: 1.8.7 dist: precise + env: SPEC_OPTS="--order rand:11" + addons: + hosts: + - mysql2gem.example.com + apt: + packages: + - mysql-server-5.5 + - mysql-client-core-5.5 + - mysql-client-5.5 - rvm: ree dist: precise - - rvm: rbx-2 - dist: precise + env: SPEC_OPTS="--order rand:11" + addons: + hosts: + - mysql2gem.example.com + apt: + packages: + - mysql-server-5.5 + - mysql-client-core-5.5 + - mysql-client-5.5 - rvm: 2.0.0 env: DB=mariadb55 addons: @@ -50,28 +68,34 @@ matrix: hosts: - mysql2gem.example.com - rvm: 2.0.0 - env: DB=mysql56 + env: DB=mysql55 addons: hosts: - mysql2gem.example.com apt: packages: - - mysql-server-5.6 - - mysql-client-core-5.6 - - mysql-client-5.6 + - mysql-server-5.5 + - mysql-client-core-5.5 + - mysql-client-5.5 - rvm: 2.0.0 env: DB=mysql57 addons: hosts: - mysql2gem.example.com - # https://github.com/travis-ci/travis-ci/issues/5122 - # apt: - # packages: - # - mysql-server-5.7 - # - mysql-client-core-5.7 - # - mysql-client-5.7 - rvm: 2.0.0 - env: DB=mysql55 + env: DB=mysql80 + addons: + hosts: + - mysql2gem.example.com + - rvm: 2.0.0 + env: DB=mysql56 os: osx + addons: + hosts: + - mysql2gem.example.com + fast_finish: true allow_failures: - rvm: ruby-head + - rvm: 2.0.0 + env: DB=mysql56 + os: osx diff --git a/.travis_mysql80.sh b/.travis_mysql80.sh new file mode 100644 index 000000000..df5ebc1c2 --- /dev/null +++ b/.travis_mysql80.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -eux + +apt-get purge -qq '^mysql*' '^libmysql*' +apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5 +add-apt-repository 'deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-8.0' +apt-get update -qq +apt-get install -qq mysql-server libmysqlclient-dev + +# https://www.percona.com/blog/2016/03/16/change-user-password-in-mysql-5-7-with-plugin-auth_socket/ +mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''" diff --git a/.travis_setup.sh b/.travis_setup.sh index 5b562f192..1d17957c5 100644 --- a/.travis_setup.sh +++ b/.travis_setup.sh @@ -7,6 +7,11 @@ if [[ -n ${DB-} && x$DB =~ ^xmysql57 ]]; then sudo bash .travis_mysql57.sh fi +# Install MySQL 8.0 if DB=mysql80 +if [[ -n ${DB-} && x$DB =~ ^xmysql80 ]]; then + sudo bash .travis_mysql80.sh +fi + # Install MySQL if OS=darwin if [[ x$OSTYPE =~ ^xdarwin ]]; then brew update