Add MySQL 5.7 to Travis configuration
Following the same setup of doctrine/dbal#2764.
This commit is contained in:
parent
60601a9323
commit
4a736f48f8
@ -20,6 +20,7 @@ before_script:
|
|||||||
- if [ "$DEPENDENCIES" != "low" ]; then composer update; fi;
|
- if [ "$DEPENDENCIES" != "low" ]; then composer update; fi;
|
||||||
- if [ "$DEPENDENCIES" == "low" ]; then composer update --prefer-lowest; fi;
|
- if [ "$DEPENDENCIES" == "low" ]; then composer update --prefer-lowest; fi;
|
||||||
- if [[ $PHPSTAN = 1 ]]; then composer require --dev --prefer-stable phpstan/phpstan:^0.7 symfony/console:^3.0; fi
|
- if [[ $PHPSTAN = 1 ]]; then composer require --dev --prefer-stable phpstan/phpstan:^0.7 symfony/console:^3.0; fi
|
||||||
|
- if [ "$MYSQL_VERSION" == "5.7" ]; then bash ./tests/travis/install-mysql-5.7.sh; fi;
|
||||||
- if [[ $DB == "mysql" || $DB == "mariadb" ]]; then mysql -e "CREATE SCHEMA doctrine_tests; GRANT ALL PRIVILEGES ON doctrine_tests.* to travis@'%'"; fi;
|
- if [[ $DB == "mysql" || $DB == "mariadb" ]]; then mysql -e "CREATE SCHEMA doctrine_tests; GRANT ALL PRIVILEGES ON doctrine_tests.* to travis@'%'"; fi;
|
||||||
|
|
||||||
script:
|
script:
|
||||||
@ -47,6 +48,13 @@ matrix:
|
|||||||
- DB=pgsql
|
- DB=pgsql
|
||||||
- PHPSTAN=1
|
- PHPSTAN=1
|
||||||
|
|
||||||
|
- php: 7.1
|
||||||
|
env: DB=mysql MYSQL_VERSION=5.7
|
||||||
|
sudo: required
|
||||||
|
- php: nightly
|
||||||
|
env: DB=mysql MYSQL_VERSION=5.7
|
||||||
|
sudo: required
|
||||||
|
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- php: nightly
|
- php: nightly
|
||||||
|
|
||||||
|
22
tests/travis/install-mysql-5.7.sh
Normal file
22
tests/travis/install-mysql-5.7.sh
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
echo "Installing MySQL 5.7..."
|
||||||
|
|
||||||
|
sudo service mysql stop
|
||||||
|
sudo apt-get remove "^mysql.*"
|
||||||
|
sudo apt-get autoremove
|
||||||
|
sudo apt-get autoclean
|
||||||
|
echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections
|
||||||
|
wget http://dev.mysql.com/get/mysql-apt-config_0.8.6-1_all.deb
|
||||||
|
sudo DEBIAN_FRONTEND=noninteractive dpkg -i mysql-apt-config_0.8.6-1_all.deb
|
||||||
|
sudo rm -rf /var/lib/apt/lists/*
|
||||||
|
sudo apt-get clean
|
||||||
|
sudo apt-get update -q
|
||||||
|
sudo apt-get install -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" mysql-server libmysqlclient-dev
|
||||||
|
sudo mysql_upgrade
|
||||||
|
|
||||||
|
echo "Restart mysql..."
|
||||||
|
sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user