image: biggora/gitlab-zone
# services:
#  - arangodb
#  - neo4j

variables:
  MYSQL_USER: "test"
  MYSQL_PASSWORD: "test"
  MYSQL_DATABASE: "test"
  MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
  POSTGRES_USER: "test"
  POSTGRES_PASSWORD: "test"
  POSTGRES_DB: "test"
  ARANGO_ROOT_PASSWORD: "test"
  ARANGO_NO_AUTH: "1"
  ARANGO_RANDOM_ROOT_PASSWORD: "0"

before_script:
    - cat /etc/hosts | grep 172

stages:
    - test

redis:
  services:
      - redis
  stage: test
  script:
      - npm install bluebird mocha should redis
      - make test-redis
  only:
      - master
  tags:
      - node

sqlite:
  stage: test
  script:
      - npm install bluebird mocha should sqlite3
      - make test-sqlite
  only:
      - master
  tags:
      - node

mysql:
  services:
      - mysql
  stage: test
  script:
      - npm install bluebird mocha should mysql
      - make test-mysql
  only:
      - master
  tags:
      - node

postgres:
  services:
      - postgres
  stage: test
  script:
      - npm install bluebird mocha should pg
      - make test-postgres
  only:
      - master
  tags:
      - node

mongo:
  services:
      - mongo
  stage: test
  script:
      - npm install bluebird mocha should mongodb
      - make test-mongo
  only:
      - master
  tags:
      - node

arango:
  services:
      - arangodb
  stage: test
  script:
      - npm install bluebird mocha should arangojs
      - make test-arango
  only:
      - master
  tags:
      - node

rethinkdb:
  services:
      - rethinkdb
  stage: test
  script:
      - npm install bluebird mocha should async generic-pool rethinkdb moment
      - make test-rethinkdb
  only:
      - master
  tags:
      - node
