Skip to content

Commit

Permalink
Replace custom install script with add-on
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Jun 3, 2019
1 parent 2820438 commit 26c4e98
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,41 @@ jobs:
- stage: Test
env: DB=mysql MYSQL_VERSION=5.7
php: 7.1
addons:
apt:
sources:
- mysql-5.7-trusty
packages:
- mysql-server
- mysql-client
before_script:
- ./tests/travis/install-mysql-$MYSQL_VERSION.sh
sudo: required

- stage: Test
env: DB=mysql MYSQL_VERSION=5.7
php: 7.2
addons:
apt:
sources:
- mysql-5.7-trusty
packages:
- mysql-server
- mysql-client
before_script:
- ./tests/travis/install-mysql-$MYSQL_VERSION.sh
sudo: required

- stage: Test
env: DB=mysql MYSQL_VERSION=5.7
php: nightly
addons:
apt:
sources:
- mysql-5.7-trusty
packages:
- mysql-server
- mysql-client
before_script:
- ./tests/travis/install-mysql-$MYSQL_VERSION.sh
sudo: required
Expand Down
16 changes: 0 additions & 16 deletions tests/travis/install-mysql-5.7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,5 @@

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;"

0 comments on commit 26c4e98

Please sign in to comment.