language: node_js
node_js:
  - "7"
  - "8"
script:
  - |
    if [ "$TEST_TYPE" = build_website ]; then
      if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = false ]; then
        echo "Building the web."
        git config --global user.name "Travis CI"
        git config --global user.email "travis@globo.com"
        sh website/publish.sh
      fi
    elif [ "$TEST_TYPE" = lint ]; then
      echo "Checking code lint."
      make lint
    elif [ "$TEST_TYPE" = unit ]; then
      make unit
    fi
env:
  matrix:
    - TEST_TYPE=unit
    - TEST_TYPE=lint
    - TEST_TYPE=build_website
cache:
  directories:
    - node_modules

language: node_js
node_js:
  - "7"
  - "8"
script:
  - |
    if [ "$TEST_TYPE" = build_website ]; then
      if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = false ]; then
        echo "Building the web."
        git config --global user.name "Travis CI"
        git config --global user.email "travis@globo.com"
        sh website/publish.sh
      fi
    elif [ "$TEST_TYPE" = lint ]; then
      echo "Checking code lint."
      make lint
    elif [ "$TEST_TYPE" = unit ]; then
      make unit
    fi
env:
  matrix:
    - TEST_TYPE=unit
    - TEST_TYPE=lint
    - TEST_TYPE=build_website
matrix:
  exclude:
    - node_js: "7"
      env: TEST_TYPE=build_website

cache:
  directories:
    - node_modules

Exclude site build for node 7
Travis: Exclude site build for node 7
