language: node_js
node_js:
  - 'node'
  - '12'
  - '10'
  - '8.9'
  - '7'
  - '6'

env:
  - workerCount=3 timeout=600000

branches:
  only:
  - master
  - develop

env:
  - SEARCH_BUILD=MANTICORE2
  - SEARCH_BUILD=MANTICORE3


matrix:
  fast_finish: true

before_install:
  - mkdir $HOME/search
  - pushd $HOME/search
  - $TRAVIS_BUILD_DIR/__tests__/install.sh
  - popd

before_script:
  - cd __tests__
  - $TRAVIS_BUILD_DIR/__tests__/run.sh
  - cd ..
  - npm install

script: npm run test

cache:
  directories:
    - node_modules