sudo: required
dist: trusty
language: node_js
node_js:
  - 4
  - 6
  - 8
env:
  - PYVER=2.7
  - PYVER=3.5
addons:
  apt:
    packages:
      - socat
      - python3
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
  - cat ~/.bashrc
  - nvm alias default "$(nvm current)"
  - ssh localhost node --version
  - pyenv versions
  - pyenv global "$PYVER"
  - which python
  - python --version
  - ssh localhost which python
  - ssh localhost python --version
script:
  - npm run travis-test

sudo: required
dist: trusty
language: node_js
node_js:
  - 4
  - 6
  - 8
env:
  - PYVER=2.7
  - PYVER=3.5
addons:
  apt:
    packages:
      - socat
      - python3
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 PATH=\"$(dirname "$(which python)"):\$PATH\" > ~/.bashrc.new
  - echo . ~/.nvm/nvm.sh >> ~/.bashrc.new
  - cat ~/.bashrc >> ~/.bashrc.new
  - mv ~/.bashrc.new ~/.bashrc
  - cat ~/.bashrc
  - nvm alias default "$(nvm current)"
  - ssh localhost node --version
  - pyenv versions
  - pyenv global "$PYVER"
  - ssh localhost python --version
script:
  - npm run travis-test

Put path to pyenv in bashrc on Travis
Put path to pyenv in bashrc on Travis
