diff options
author | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2017-06-05 20:32:00 +0200 |
---|---|---|
committer | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2017-06-05 23:42:13 +0200 |
commit | 4bd825e7782338b00a91a0a0c6f882a276f095a9 (patch) | |
tree | 1c52aedf96a629931999d58246d58e79180be465 /tests/travis | |
parent | 4784f847c9d752c34ff4eeec8a6c40455fe313ce (diff) | |
download | volse-hubzilla-4bd825e7782338b00a91a0a0c6f882a276f095a9.tar.gz volse-hubzilla-4bd825e7782338b00a91a0a0c6f882a276f095a9.tar.bz2 volse-hubzilla-4bd825e7782338b00a91a0a0c6f882a276f095a9.zip |
:construction_worker::white_check_mark: Add MySQL 5.7 in TravisCI.
Use a Docker container to add MySQL 5.7 in TravisCI.
A lot of sql_mode settings have changed with 5.7, so finnaly provide it
to test against it.
Diffstat (limited to 'tests/travis')
-rwxr-xr-x | tests/travis/prepare_mysql.sh | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/tests/travis/prepare_mysql.sh b/tests/travis/prepare_mysql.sh index b3d84253c..095ad7e25 100755 --- a/tests/travis/prepare_mysql.sh +++ b/tests/travis/prepare_mysql.sh @@ -27,22 +27,27 @@ set -e echo "Preparing for MySQL ..." +if [[ "$MYSQL_VERSION" == "5.7" ]]; then + echo "Using MySQL 5.7 in Docker container, need to use TCP" + export PROTO="--protocol=TCP" +fi + # Print out some MySQL information mysql --version -mysql -e "SELECT VERSION();" -mysql -e "SHOW VARIABLES LIKE 'max_allowed_packet';" -mysql -e "SHOW VARIABLES LIKE 'collation_%';" -mysql -e "SHOW VARIABLES LIKE 'character_set%';" -mysql -e "SELECT @@sql_mode;" +mysql $PROTO -e "SELECT VERSION();" +mysql $PROTO -e "SHOW VARIABLES LIKE 'max_allowed_packet';" +mysql $PROTO -e "SHOW VARIABLES LIKE 'collation_%';" +mysql $PROTO -e "SHOW VARIABLES LIKE 'character_set%';" +mysql $PROTO -e "SELECT @@sql_mode;" # Create Hubzilla database -mysql -u root -e "CREATE DATABASE IF NOT EXISTS hubzilla;"; -mysql -u root -e "CREATE USER 'hubzilla'@'localhost' IDENTIFIED BY 'hubzilla';" -mysql -u root -e "GRANT ALL ON hubzilla.* TO 'hubzilla'@'localhost';" +mysql $PROTO -u root -e "CREATE DATABASE IF NOT EXISTS hubzilla;"; +mysql $PROTO -u root -e "CREATE USER 'hubzilla'@'localhost' IDENTIFIED BY 'hubzilla';" +mysql $PROTO -u root -e "GRANT ALL ON hubzilla.* TO 'hubzilla'@'localhost';" # Import table structure -mysql -u root hubzilla < ./install/schema_mysql.sql +mysql $PROTO -u root hubzilla < ./install/schema_mysql.sql # Show databases and tables -mysql -u root -e "SHOW DATABASES;" -mysql -u root -e "USE hubzilla; SHOW TABLES;" +mysql $PROTO -u root -e "SHOW DATABASES;" +mysql $PROTO -u root -e "USE hubzilla; SHOW TABLES;" |