language: node_js

matrix:
  include:
    - os: linux
      dist: trusty
      sudo: false
      node_js: "6"
      env: DEPLOY="true"
    - os: osx
      node_js: "6"

env:
  - DEBUG="zyre*"

script:
  - 'if [[ $DEPLOY == true ]]; then travis_retry npm run cov; else travis_retry npm test; fi'

after_success:
  - 'if [[ $DEPLOY == true ]]; then npm run build:docs; bash <(curl -s https://codecov.io/bash); fi'

deploy:
  provider: pages
  skip_cleanup: true
  local_dir: docs
  github_token: $GITHUB_TOKEN
  on:
    branch: master
    condition: "$DEPLOY = true"

language: node_js

matrix:
  include:
    - os: linux
      dist: trusty
      sudo: false
      node_js: "6"
      env: DEPLOY="true"
    - os: osx
      node_js: "6"

env:
  global:
    - DEBUG="zyre*"

script:
  - 'if [[ $DEPLOY == true ]]; then travis_retry npm run cov; else travis_retry npm test; fi'

after_success:
  - 'if [[ $DEPLOY == true ]]; then npm run build:docs; bash <(curl -s https://codecov.io/bash); fi'

deploy:
  provider: pages
  skip_cleanup: true
  local_dir: docs
  github_token: $GITHUB_TOKEN
  on:
    branch: master
    condition: "$DEPLOY = true"

Set global Travis debug variable
Set global Travis debug variable
