Set up initial config for gitlab ci
This commit is contained in:
parent
e7d4f64889
commit
189b02e60f
38
.gitlab-ci.yml
Normal file
38
.gitlab-ci.yml
Normal file
@ -0,0 +1,38 @@
|
||||
before_script:
|
||||
# Install dependencies
|
||||
- bash test/docker_install.sh > /dev/null
|
||||
|
||||
services:
|
||||
- mysql:latest
|
||||
- postgres:latest
|
||||
|
||||
variables:
|
||||
MYSQL_ROOT_PASSWORD: foo-bar-baz
|
||||
MYSQL_DATABASE: test
|
||||
MYSQL_USER: test
|
||||
MYSQL_PASSWORD: test
|
||||
POSTGRES_DB: test
|
||||
POSTGRES_USER: test
|
||||
POSTGRES_PASSWORD: test
|
||||
|
||||
# This folder is cached between builds
|
||||
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
|
||||
cache:
|
||||
paths:
|
||||
- node_modules/
|
||||
|
||||
test:4:
|
||||
image: node:4
|
||||
script: npm run test
|
||||
|
||||
test:5:
|
||||
image: node:5
|
||||
script: npm run test
|
||||
|
||||
test:6:
|
||||
image: node:6
|
||||
script: npm run test
|
||||
|
||||
test:latest:
|
||||
image: node:latest
|
||||
script: npm run test
|
34
test/config-ci.json
Normal file
34
test/config-ci.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"mysql2": {
|
||||
"driver": "mysql",
|
||||
"connection": {
|
||||
"host": "mysql2",
|
||||
"user": "test",
|
||||
"password": "test",
|
||||
"database": "test"
|
||||
}
|
||||
},
|
||||
"pg": {
|
||||
"driver": "pg",
|
||||
"connection": "postgres://test:test@posgres/test"
|
||||
},
|
||||
"pg-object": {
|
||||
"driver": "pg",
|
||||
"connection": {
|
||||
"database": "test"
|
||||
}
|
||||
},
|
||||
"dblite": {
|
||||
"driver": "sqlite",
|
||||
"connection": ":memory:"
|
||||
},
|
||||
"node-firebird": {
|
||||
"driver": "firebird",
|
||||
"connection": {
|
||||
"host": "127.0.0.1",
|
||||
"database": "/../FB_TEST_DB.FDB",
|
||||
"user": "SYSDBA",
|
||||
"password": "masterkey"
|
||||
}
|
||||
}
|
||||
}
|
13
test/docker_install.sh
Normal file
13
test/docker_install.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# We need to install dependencies only for Docker
|
||||
[[ ! -e /.dockerenv ]] && [[ ! -e /.dockerinit ]] && exit 0
|
||||
|
||||
# Where am I?
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
set -xe
|
||||
|
||||
# Replace test config with docker config file
|
||||
rm "$DIR/config.json"
|
||||
mv "$DIR/config-ci.json $DIR/config.json"
|
Loading…
Reference in New Issue
Block a user