dist: xenial
language: node_js
install: npm install

cache:
  directories:
    - node_modules

jobs:
  include:
      # Lint doesn't need to build
    - stage: lint
      script: npm run lint
      node_js: "12"
    - stage: unit tests
      # Test already builds
      script: npm run test
      node_js: "10"
    - node_js: "12"
    - stage: coverage
      # Coverage does NOT build
      script: npm run build && npm run coverage
      node_js: "12"

# NOTE: This is unused atm
# notifications:
#    webhooks:
#        urls:
#            - "https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MEhhbGYtU2hvdCUzQWhhbGYtc2hvdC51ay8lMjFxUE5PblVzTnNaclRvRlpxeEIlM0FoYWxmLXNob3QudWs"
#        on_success: change  # always|never|change
#        on_failure: always
#        on_start: never

dist: xenial
language: node_js
install: npm ci

cache:
  directories:
    - node_modules

jobs:
  include:
      # Lint doesn't need to build
    - stage: lint
      script: npm run lint
      node_js: "12"
    - stage: unit tests
      # Test already builds
      script: npm run test
      node_js: "10"
    - node_js: "12"
    - stage: coverage
      # Coverage does NOT build
      script: npm run build && npm run coverage
      node_js: "12"

# NOTE: This is unused atm
# notifications:
#    webhooks:
#        urls:
#            - "https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MEhhbGYtU2hvdCUzQWhhbGYtc2hvdC51ay8lMjFxUE5PblVzTnNaclRvRlpxeEIlM0FoYWxmLXNob3QudWs"
#        on_success: change  # always|never|change
#        on_failure: always
#        on_start: never

Install with `npm ci` on CI
Install with `npm ci` on CI