language: node_js
node_js:
  - "4"
  - "6"
script:
  - >
    if [ "$TRAVIS_EVENT_TYPE" == "cron" ] && node --version | grep v6\. ; then
      ./bin/build.sh test:live;
    else
      echo "skipping live tests";
    fi
  - npm run coveralls
  - npm run lint
  - >
    if [[ $(node --version | cut -c 2-) < 6 ]]; then
      echo "skipping jest plugin test";
    else
      npm run test:plugin:jest;
    fi

language: node_js
node_js:
  - "4"
  - "6"
script:
  - >
    if [ "$TRAVIS_EVENT_TYPE" == "cron" ] && node --version | grep v6\. ; then
      ./bin/build.sh test:live;
    else
      echo "skipping live tests";
    fi
  - npm run coveralls
  - npm run lint
  - >
    if node --version | grep v6\. ; then
      npm run test:plugin:jest;
    else
      echo "skipping jest plugin test";
    fi

Use grep to check node version
Use grep to check node version

Using grep is less future-proof but the better option, as comparing
using `<` can be incorrect.
