language: node_js

notifications:
  email: false

services:
  - docker

node_js:
  - 10
  - 8

# Trigger a push build on master and greenkeeper branches + PRs build on every branches
# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147)
branches:
  only:
    - master
    - /^greenkeeper.*$/

# Retry install on fail to avoid failing a build on network/disk/external errors
install:
  - travis_retry npm install

script:
  - npm run test

jobs:
  include:
    - stage: release
      if: branch = master
      node_js: lts/*
      script:
        - npm run semantic-release
