sudo: false
language: node_js
node_js:
  - "0.12"
  - "4.2"
env:
  - TARGET=test
  - TARGET=test-stress
  - TARGET=test-multi
  - TARGET=test-multi-remote
before_install:
  - sudo apt-get update -qq
  - sudo apt-get install -qq socat
  - 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 0.12
  - ssh localhost node --version
script: npm run travis-$TARGET

sudo: false
language: node_js
node_js:
  - "4.2"
env:
  - TARGET=test
  - TARGET=test-stress
  - TARGET=test-multi
  - TARGET=test-multi-remote
before_install:
  - sudo apt-get update -qq
  - sudo apt-get install -qq socat
  - 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 4.2
  - ssh localhost node --version
script: npm run travis-$TARGET

Use 4.2 in nvm command
Use 4.2 in nvm command
