sudo: false os: - osx - linux before_install: - if [ $TRAVIS_OS_NAME == "linux" ]; then export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; sleep 3; fi install: - TRAVIS_NODE_VERSION="6"; # Clear out whatever version of NVM Travis has as it is old. - rm -rf ~/.nvm; # Grab NVM. - git clone https://github.com/creationix/nvm.git ~/.nvm; # Checkout the latest stable tag. # Note that you can just hardcode a preferred version here. - (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`); # Install the desired version of Node - source ~/.nvm/nvm.sh; - nvm install $TRAVIS_NODE_VERSION; - npm install - npm run prepublish script: - npm test --silent