From dc635cf8c6f39bc2bfac0e0b19119ff4b7bcfa0a Mon Sep 17 00:00:00 2001 From: nilstes <nils.tesdal@gmail.com> Date: Tue, 11 Sep 2018 16:25:56 +0200 Subject: [PATCH] =?UTF-8?q?feils=C3=B8k?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 63d548e..69caea1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,20 @@ image: node:6 +# Set up MySQL test-database +services: + - mysql:latest + +# Configure test-database +variables: + MYSQL_DATABASE: db + MYSQL_ROOT_PASSWORD: password + +# Create database tables +connect: + image: mysql + script: + - echo "SELECT 'OK';" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql "$MYSQL_DATABASE" < create_tables.sql + # Install node libraries before_script: - npm install @@ -22,17 +37,3 @@ pages: only: - master -# Set up MySQL test-database -services: - - mysql:latest - -# Configure test-database -variables: - MYSQL_DATABASE: db - MYSQL_ROOT_PASSWORD: password - -# Create database tables -connect: - image: mysql - script: - - echo "SELECT 'OK';" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql "$MYSQL_DATABASE" < create_tables.sql -- GitLab