language: node_js
sudo: true
node_js:
- "10"
- "9"
- "8"

cache:
  yarn: true
  directories:
  - node_modules

stages:
- test
- name: deploy
  if: branch = master && type = push
jobs:
  include:
  - stage: deploy
    before_install: skip
    before_script: skip
    after_script: skip
    script:
    - yarn build:doc
    deploy:
      provider: pages
      skip-cleanup: true
      github-token: "$GH_TOKEN"
      local-dir: docs
      on:
        branch: master
  - script:
    - yarn build
    - yarn semantic-release
    after_success: skip
    before_script: skip
    after_script: skip


before_install:
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then curl -H "Cache-Control: no-cache" https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sudo bash ; fi'
install: true
script:
- yarn test
after_success:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
before_script:
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then fossa ; fi'
- yarn add --dev coveralls

language: node_js
sudo: true
node_js:
- "11"
- "10"
- "9"
- "8"

cache:
  yarn: true
  directories:
  - node_modules

stages:
- test
- name: deploy
  if: branch = master && type = push
jobs:
  include:
  - stage: deploy
    before_install: skip
    before_script: skip
    after_script: skip
    script:
    - yarn build:doc
    deploy:
      provider: pages
      skip-cleanup: true
      github-token: "$GH_TOKEN"
      local-dir: docs
      on:
        branch: master
  - script:
    - yarn build
    - yarn semantic-release
    after_success: skip
    before_script: skip
    after_script: skip


before_install:
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then curl -H "Cache-Control: no-cache" https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sudo bash ; fi'
install: true
script:
- yarn test
after_success:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
before_script:
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then fossa ; fi'
- yarn add --dev coveralls

Add test for Node 11
ci(Node): Add test for Node 11
