language: node_js
git:
  submodules: false
  depth: 1
node_js:
    - "6.11.2"
env:
  - CXX=g++-4.8
sudo: required
dist: trusty
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8
before_install:
    - mkdir -p submodules
    - git submodule update --init
    - sudo apt-get install graphicsmagick
    - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
    - echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
    - sudo apt-get update
    - sudo apt-get install -y mongodb-org
    - mongod --version
    - sudo service mongod start
    - until nc -z localhost 27017; do sleep 1; done
    - test_ver=`git submodule status | grep tests | cut -f 2 -d '-' | cut -f 1 -d ' '`
    - cd submodules/tests
    - git checkout $test_ver
    - cd backend
    - mongorestore
    - cd ../../../backend

install: yarn install

cache:
  yarn: true
  directories:
    - node_modules

services:
  - rabbitmq
script:
    - yarn run test
notifications:
    email: 
        recipients:
            - team@3drepo.org

language: node_js
git:
  submodules: false
  depth: 1
node_js:
    - "6.11.2"
env:
  - CXX=g++-4.8
sudo: required
dist: trusty
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8
before_install:
    - mkdir -p submodules
    - cd submodules
    - git clone https://$TESTS_USER:$TESTS_PASSWORD@github.com/3drepo/tests.git
    - cd ..
    - sudo apt-get install graphicsmagick
    - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
    - echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
    - sudo apt-get update
    - sudo apt-get install -y mongodb-org
    - mongod --version
    - sudo service mongod start
    - until nc -z localhost 27017; do sleep 1; done
    - test_ver=`git submodule status | grep tests | cut -f 2 -d '-' | cut -f 1 -d ' '`
    - cd submodules/tests
    - git checkout $test_ver
    - cd backend
    - mongorestore
    - cd ../../../backend

install: yarn install

cache:
  yarn: true
  directories:
    - node_modules

services:
  - rabbitmq
script:
    - yarn run test
notifications:
    email: 
        recipients:
            - team@3drepo.org

Revert "this is using head of master for test."
Revert "this is using head of master for test."

This reverts commit 7c2870221f6430db543b7a5a94f24015f8cdeae1.
