os:
  - linux
  - osx

dist: trusty

language: node_js
node_js:
  - 4
  - 6
  - 7
  - 8

before_install:
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install zmq; fi

script:
  - travis_retry npm run report:coveralls

env:
  global:
    - NODE_ENV=development

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - libzmq3-dev

os:
  - linux
  - osx

dist: trusty

language: node_js
node_js:
  - 4
  - 6
  - 7
  - 8

#
# The last test is required to avoid issues with peer dependencies upon
# `npm install`.
#
# See:
#   https://github.com/npm/npm/issues/4749
#   https://stackoverflow.com/questions/33816824/getting-npm-err-code-epeerinvalid-on-npm-packages-global-install
#
before_install:
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install zmq; fi
  - if [[ "$TRAVIS_NODE_VERSION" == "4" ]]; then npm install -g npm@3; fi

script:
  - travis_retry npm run report:coveralls

env:
  global:
    - NODE_ENV=development

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - libzmq3-dev

Fix peer dependencies issue on CI
Fix peer dependencies issue on CI

npm@2 throws strange errors with peer dependencies;
this behavior was altered from npm@>=3.
