sudo: false
language: node_js
services:
  - mongodb
addons:
  apt:
    sources:
    - mongodb-3.0-precise
    packages:
    - mongodb-org-server
cache:
  directories:
    - node_modules
notifications:
  email: true
node_js:
  - "6"
  - "5"
  - "4"
  - "0.12"
  - "0.10"
before_install:
  - npm i -g npm@^2.0.0
  - npm i graphql graphql-compose graphql-compose-connection mongoose
before_script:
  - npm prune
script:
  - npm run coverage
  - npm run build
after_success:
  - 'curl -Lo travis_after_all.py https://git.io/travis_after_all'
  - python travis_after_all.py
  - export $(cat .to_export_back) &> /dev/null
  - if [[ "$TRAVIS_JOB_NUMBER" == *.1 && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then bash <(curl -s https://codecov.io/bash); fi
  - if [[ "$TRAVIS_JOB_NUMBER" == *.1 && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then npm run semantic-release; fi
branches:
  except:
    - /^v\d+\.\d+\.\d+$/

sudo: false
language: node_js
services:
  - mongodb
addons:
  apt:
    sources:
    - mongodb-3.0-precise
    packages:
    - mongodb-org-server
cache:
  yarn: true
  directories:
    - node_modules
notifications:
  email: true
node_js:
  - "7"
  - "6"
  - "5"
  - "4"
script:
  - yarn add -g graphql graphql-compose graphql-compose-connection mongoose
  - yarn run coverage
  - yarn run build
after_success:
  - 'curl -Lo travis_after_all.py https://git.io/travis_after_all'
  - python travis_after_all.py
  - export $(cat .to_export_back) &> /dev/null
  - if [[ "$TRAVIS_JOB_NUMBER" == *.1 && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then bash <(curl -s https://codecov.io/bash); fi
  - if [[ "$TRAVIS_JOB_NUMBER" == *.1 && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then npm run semantic-release; fi
branches:
  except:
    - /^v\d+\.\d+\.\d+$/

Use yarn instead of npm. Drop old node versions.
ci(Travis): Use yarn instead of npm. Drop old node versions.
