Skip to content

Commit a4a9d59

Browse files
paultcochranepreaction
authored andcommitted
Use MySQL 5.7 for tests
JSON support is required for the tests to run, and this support was added in MySQL 5.7, however only MySQL 5.6 is available at present on Travis-CI.
1 parent 116f148 commit a4a9d59

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.travis.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,24 @@ perl:
66
matrix:
77
include:
88
- perl: "5.24"
9-
env: COVERAGE=1
9+
env: COVERAGE=1 MYSQL_VERSION=5.7
1010
allow_failures:
1111
- perl: "blead"
12+
env: MYSQL_VERSION=5.7
1213

1314
before_install:
15+
- if [ x"$MYSQL_VERSION" != "x" ];
16+
then
17+
sudo service mysql stop;
18+
sudo aptitude purge -y mysql-server libmysqlclient-dev mysql-server-5.6 mysql-common-5.6 mysql-client-5.6 libmysqlclient18 mysql-client-core-5.6 mysql-server-core-5.6 libdbd-mysql-perl mysql-common;
19+
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5;
20+
. /etc/lsb-release;
21+
sudo add-apt-repository "deb http://repo.mysql.com/apt/ubuntu/ $DISTRIB_CODENAME mysql-$MYSQL_VERSION";
22+
sudo apt-get update;
23+
sudo DEBIAN_FRONTEND=noninteractive apt-get -q --yes --fix-broken --allow-unauthenticated --option DPkg::Options::=--force-confnew install mysql-server libmysqlclient-dev;
24+
sudo mysql_upgrade -u root --password='' --force;
25+
sudo service mysql restart;
26+
fi
1427
- git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers
1528
- source ~/travis-perl-helpers/init
1629
- build-perl

0 commit comments

Comments
 (0)