language: node_js

node_js:
- 8
- 12
- node

sudo: false

before_script:
  - npm install

script:
  - npm run test

deploy:
  provider: npm
  email: engineering-managers@wikimedia.de
  api_key:
    secure: UD4T61ZzgshstkdSRlm67mTozh79hOdJla6skyjp/KlijK21NG/1r5jB1DSo9GZNg/5W9vLOtm1GSf7qFJxrdrZSovM2ElG3VM5d3vwa7AfbR9jibjQzdYfAfAgqa5mIgPNFJjsa5utxPpeOQDzsjKwJsBp3LYlQaAArvZquUiA=
  on:
    tags: true
    branch: master
    condition: "$TRAVIS_NODE_VERSION = 12"

notifications:
  irc:
    channels:
      - "irc.libera.chat#wikidata-feed"
    on_success: change
    on_failure: always
    template:
      - "%{repository}/%{branch}/%{commit} : %{author} %{message} %{build_url}"
