language: node_js

cache:
    directories:
        - node_modules

node_js:
    - node
# Legacy Node; Bump engine requirements & drop when fail
    - 6
    - 5
    - 4

sudo: false

matrix:
    fast_finish: true

before_install:
# Update npm to latest version
    - if [[ `node -v` >=7.0.0 ]]
      then
        npm i -g npm
# Use last version packaged with Node 6
    - elif [[ `node -v` >=6.0.0<7.0.0 ]]
      then
        npm i -g npm@3.10.9
# Use last version packaged with Node 5
    - elif [[ `node -v` >=5.0.0<6.0.0 ]]
      then
        npm i -g npm@3.8.6
# Use last version packaged with Node 4
    - elif [[ `node -v` >=4.0.0<5.0.0 ]]
      then
        npm i -g npm@2.15.11
      fi
    - npm -v
    - npm update
    - npm prune
    - 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_retry npm i

postinstall:
    - npm run postinstall

script:
    - npm t --silent
language: node_js

cache:
    directories:
        - node_modules

node_js:
    - node
# Legacy Node; Bump engine requirements & drop when fail
    - 6
    - 5
    - 4

sudo: false

matrix:
    fast_finish: true

before_install:
# Update npm to latest version
    - if [[ `node -v` >= 7.0.0 ]]; then npm i -g npm; fi
    - npm -v
    - npm update
    - npm prune
    - 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_retry npm i

postinstall:
    - npm run postinstall

script:
    - npm t --silent
Remove legacy npm (already done by Travis)
Remove legacy npm (already done by Travis)
