Skip to content
Snippets Groups Projects
Commit 02ea0a42 authored by Mathias Picker's avatar Mathias Picker
Browse files

ci

parent e31fae00
No related branches found
No related tags found
No related merge requests found
variables:
# Configure server/src/mysql-pool.js
MYSQL_HOST: localhost
MYSQL_USER: root # Docker commands are run as root
MYSQL_PASSWORD: '' # Default root password is empty string
MYSQL_DATABASE: todo-test
test:
stage: test
script:
- apt-get update
- apt-get -y upgrade
- apt-get -y install mysql-server
- service mysql start
# Workaround from https://github.com/mysqljs/mysql/issues/1507#issuecomment-242885003
- echo "UPDATE user SET authentication_string=password(''), plugin='mysql_native_password' WHERE
user='root';" | mysql mysql
- mysqladmin create $MYSQL_DATABASE
# Create database table
- echo "CREATE TABLE Tasks (id INT NOT NULL AUTO_INCREMENT, title TEXT NOT NULL, done BOOL
DEFAULT false, PRIMARY KEY(id));" | mysql $MYSQL_DATABASE
\ No newline at end of file
......@@ -5,7 +5,7 @@
"license": "MIT",
"scripts": {
"start": "nodemon src/server.js --exec \"babel-node --require ./src/config\"",
"test": "jest --setupFiles ./test/config"
"test": "jest"
},
"browserslist": [
"maintained node versions"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment