Skip to content
Snippets Groups Projects
Commit 916f38ba authored by nilstes's avatar nilstes
Browse files

added service mysql

parent c95f05d3
No related branches found
No related tags found
No related merge requests found
image: node:6
# Install node libraries
before_script:
- npm install
# Run JEST tests
test:
script:
- npm test
# Publish coverage report on gitlab-pages
pages:
stage: deploy
script:
......@@ -18,3 +21,18 @@ pages:
- public
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
CREATE TABLE`person` (
`id` int(11) NOT NULL,
`navn` varchar(256) NOT NULL,
`alder` int(3) DEFAULT NULL,
`adresse` varchar(256) NOT NULL,
`bilde_base64` longtext
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment