From b9bc03a1bdf146e0b4ef6529ebe814a0ac9c930d Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sat, 25 Nov 2017 10:53:50 +0100 Subject: [PATCH] Changed tests database to mariadb --- .gitlab-ci.yml | 9 +++++---- config/config.default.php | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1cc9797b..6dde2330 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,12 +5,13 @@ cache: - .composer services: - - mysql:5.6 + - mariadb:10.2 variables: MYSQL_DATABASE: engelsystem MYSQL_USER: engel MYSQL_PASSWORD: engelsystem + MYSQL_HOST: mariadb COMPOSER_HOME: .composer MYSQL_RANDOM_ROOT_PASSWORD: "yes" @@ -20,14 +21,14 @@ before_script: - find . -type d -exec chmod 755 {} \; # Install required Packages - apt update -yqq - - apt install -yqq git unzip mysql-client + - apt install -yqq git unzip mariadb-client - docker-php-ext-install pdo pdo_mysql gettext # Install xdebug - pecl install xdebug - docker-php-ext-enable xdebug # MySQL DB - - mysql -h mysql -u "$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE" < db/install.sql - - mysql -h mysql -u "$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE" < db/update.sql + - mysql -h "$MYSQL_HOST" -u "$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE" < db/install.sql + - mysql -h "$MYSQL_HOST" -u "$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE" < db/update.sql # Install Composer - curl -sS https://getcomposer.org/installer | php -- --no-ansi --install-dir /usr/local/bin/ --filename composer - /usr/local/bin/composer --no-ansi install diff --git a/config/config.default.php b/config/config.default.php index 1bad9668..7594346a 100644 --- a/config/config.default.php +++ b/config/config.default.php @@ -5,7 +5,7 @@ return [ // MySQL-Connection Settings 'database' => [ - 'host' => env('MYSQL_HOST', (env('CI', false) ? 'mysql' : 'localhost')), + 'host' => env('MYSQL_HOST', (env('CI', false) ? 'mariadb' : 'localhost')), 'user' => env('MYSQL_USER', 'root'), 'pw' => env('MYSQL_PASSWORD', ''), 'db' => env('MYSQL_DATABASE', 'engelsystem'),