sudo: true
language: node_js
node_js:
  - 4
  - 6
  - 8
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - socat
      - g++-4.8
env:
  global:
    - CXX=g++-4.8
  matrix:
    - TARGET=test
    - TARGET=test-stress
    - TARGET=test-multi
    - TARGET=test-multi-remote
before_install:
  - ssh-keygen -t rsa -f ~/.ssh/id_rsa -N ''
  - cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
  - ssh-keyscan -t rsa localhost >> ~/.ssh/known_hosts
  - echo . ~/.nvm/nvm.sh > ~/.bashrc.new
  - cat ~/.bashrc >> ~/.bashrc.new
  - mv ~/.bashrc.new ~/.bashrc
  - nvm alias default "$(node --version)"
  - ssh localhost node --version
script:
  - npm run travis-$TARGET-$(node --version | grep -oE '[0-9]+' | head -1)

sudo: true
language: node_js
node_js:
  - 8
  - 6
  - 4
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - socat
      - g++-4.8
env:
  global:
    - CXX=g++-4.8
  matrix:
    - TARGET=test
    - TARGET=test-stress
    - TARGET=test-multi
    - TARGET=test-multi-remote
before_install:
  - ssh-keygen -t rsa -f ~/.ssh/id_rsa -N ''
  - cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
  - ssh-keyscan -t rsa localhost >> ~/.ssh/known_hosts
  - echo . ~/.nvm/nvm.sh > ~/.bashrc.new
  - cat ~/.bashrc >> ~/.bashrc.new
  - mv ~/.bashrc.new ~/.bashrc
  - nvm alias default "$(node --version)"
  - ssh localhost node --version
script:
  - npm run travis-$TARGET-$(node --version | grep -oE '[0-9]+' | head -1)

Test Node 8 on Travis first
Test Node 8 on Travis first
