dist: trusty
language: node_js
node_js:
  - "lts/*"
cache:
  yarn: true
  directories:
    - "node_modules"
    - "$HOME/.sonar/cache"
addons:
  sonarcloud:
    organization: "paulsmirnov-github"
    branches:
      - dev
before_install:
  - yarn global add greenkeeper-lockfile@1
before_script:
  - greenkeeper-lockfile-update
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
  - chmod +x ./cc-test-reporter
after_script:
  - greenkeeper-lockfile-upload
script:
  - npm run build
  - sonar-scanner
after_success:
  - npm run coveralls
  - npm run codecov
  - npm run codacy
  - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi

dist: trusty
language: node_js
node_js:
  - "lts/*"
cache:
  yarn: true
  directories:
    - "node_modules"
    - "$HOME/.sonar/cache"
addons:
  sonarcloud:
    organization: "paulsmirnov-github"
    branches:
      - dev
before_install:
  - yarn global add greenkeeper-lockfile@1
before_script:
  - greenkeeper-lockfile-update
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
  - chmod +x ./cc-test-reporter
after_script:
  - greenkeeper-lockfile-upload
script:
  - npm run build
  - sonar-scanner
after_success:
  - npm run coveralls
  - npm run codecov
  - npm run codacy
  - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
deploy:
  - provider: npm
    skip_cleanup: true
    email: "$NPM_EMAIL"
    api_key: "$NPM_AUTH_TOKEN"
    tag: latest
    on:
      tags: true
      condition: "$TRAVIS_TAG =~ ^v\\d+\\.\\d+\.\\d+$"

Add npm deployment to CI
Add npm deployment to CI
