sudo: false

language: node_js

node_js:
  - 6 # Maintenance
  - 8 # Active
  - 10 # Current release

notifications:
  email:
    # Only send notifications when travis status changes
    on_failure: change
    on_success: change

cache:
  bundler: true
  directories:
    - $HOME/.npm

addons:
  code_climate:
    repo_token: $CODE_CLIMATE

branches:
  only:
    - master
    - next

script:
  - npm run lint
  - npm run test:cov

deploy:
  - provider: npm
    skip_cleanup: true
    email: $NPM_EMAIL
    api_key: $NPM_TOKEN
    on:
      node: '10'
      branch: 'master'
  - provider: npm
    skip_cleanup: true
    email: $NPM_EMAIL
    api_key: $NPM_TOKEN
    tag: next
    on:
      node: '10'
      branch: 'next'

after_success:
  - npm install -g codeclimate-test-reporter
  - codeclimate-test-reporter < coverage/lcov.info
  - npm run codecov

sudo: false

language: node_js

node_js:
  - 6 # Maintenance
  - 8 # Active
  - 9
  # - 10 disabled due to issues with targaryen + firebase-server and npm ci:
  # "npm ERR! stringstream not accessible from targaryen:request"

notifications:
  email:
    # Only send notifications when travis status changes
    on_failure: change
    on_success: change

cache:
  bundler: true
  directories:
    - $HOME/.npm

addons:
  code_climate:
    repo_token: $CODE_CLIMATE

branches:
  only:
    - master
    - next

script:
  - npm run lint
  - npm run test:cov

deploy:
  - provider: npm
    skip_cleanup: true
    email: $NPM_EMAIL
    api_key: $NPM_TOKEN
    on:
      node: '9'
      branch: 'master'
  - provider: npm
    skip_cleanup: true
    email: $NPM_EMAIL
    api_key: $NPM_TOKEN
    tag: next
    on:
      node: '9'
      branch: 'next'

after_success:
  - npm install -g codeclimate-test-reporter
  - codeclimate-test-reporter < coverage/lcov.info
  - npm run codecov

Switch node 10 back to node 9
Switch node 10 back to node 9
