Skip to content

Commit

Permalink
Travis CI should run MySQL 5.5 tests on Trusty
Browse files Browse the repository at this point in the history
  • Loading branch information
sodabrew committed Dec 27, 2017
1 parent 8c6186b commit b2cfca1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,11 @@ matrix:
mariadb: 10.2
hosts:
- mysql2gem.example.com
- rvm: 2.0.0
- rvm: 2.4
env: DB=mysql55
dist: precise
addons:
hosts:
- mysql2gem.example.com
apt:
packages:
- mysql-server-5.5
- mysql-client-core-5.5
- mysql-client-5.5
- rvm: 2.4
env: DB=mysql57
addons:
Expand All @@ -67,7 +61,7 @@ matrix:
hosts:
- mysql2gem.example.com
- os: osx
rvm: 2.3
rvm: 2.4
env: DB=mysql56
addons:
hosts:
Expand All @@ -76,5 +70,5 @@ matrix:
allow_failures:
- rvm: ruby-head
- os: osx
rvm: 2.3
rvm: 2.4
env: DB=mysql56
8 changes: 8 additions & 0 deletions .travis_mysql55.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -eux

apt-get purge -qq '^mysql*' '^libmysql*'
rm -fr /etc/mysql
rm -fr /var/lib/mysql
apt-get install -qq mysql-server-5.5 mysql-client-core-5.5 mysql-client-5.5 libmysqlclient-dev
5 changes: 5 additions & 0 deletions .travis_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -eux

# Install MySQL 5.5 if DB=mysql55
if [[ -n ${DB-} && x$DB =~ ^xmysql55 ]]; then
sudo bash .travis_mysql55.sh
fi

# Install MySQL 5.7 if DB=mysql57
if [[ -n ${DB-} && x$DB =~ ^xmysql57 ]]; then
sudo bash .travis_mysql57.sh
Expand Down

0 comments on commit b2cfca1

Please sign in to comment.