# in order to use 'trusty' dist, need this.
# see https://docs.travis-ci.com/user/trusty-ci-environment/
sudo: required

# trust dist provides a modern build chain (as opposed to 'precise' dist)
# which absolves us from having to install compilers and stuff
dist: trusty

language: node_js

env: TARGET=test
  # Nothing needed

matrix:
  include:
    - node_js: '6'
    - node_js: '5'
    - node_js: '4'

#before_install:
  # nothing to do


#services:
  # 1. needed to test
  # - elasticsearch


before_script:
  # 1. ElasticSearch takes few seconds to start, to make sure it is available when the build script runs
  # add a small delay to your build script:
  # - sleep 10
  # or 2. install specific version of elasticsearch
  - curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.3.3/elasticsearch-2.3.3.deb && sudo dpkg -i --force-confnew elasticsearch-2.3.3.deb && sudo service elasticsearch restart
  - echo "Waiting 10sec that elaticsearch starts"
  - sleep 10
  - echo "check elasticsearch availability"
  - curl http://localhost:9200

script: 'npm run-script test'

notifications:
  on_success: change
  on_failure: always

# in order to use 'trusty' dist, need this.
# see https://docs.travis-ci.com/user/trusty-ci-environment/
sudo: required

# trust dist provides a modern build chain (as opposed to 'precise' dist)
# which absolves us from having to install compilers and stuff
dist: trusty

language: node_js

env: TARGET=test
  # Nothing needed

matrix:
  include:
    - node_js: 'node'
    - node_js: '6'
    - node_js: '5'
    - node_js: '4'

#before_install:
  # nothing to do


#services:
  # 1. needed to test
  # - elasticsearch


before_script:
  # 1. ElasticSearch takes few seconds to start, to make sure it is available when the build script runs
  # add a small delay to your build script:
  # - sleep 10
  # or 2. install specific version of elasticsearch
  - curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.3.3/elasticsearch-2.3.3.deb && sudo dpkg -i --force-confnew elasticsearch-2.3.3.deb && sudo service elasticsearch restart
  - echo "Waiting 10sec that elaticsearch starts"
  - sleep 10
  - echo "check elasticsearch availability"
  - curl http://localhost:9200

script: 'npm run-script test'

notifications:
  on_success: change
  on_failure: always
Revert "Travis : removing node target"
Revert "Travis : removing node target"

This reverts commit c7bc083eb4c0289a03c365bd6c4843e6de8c376f.
