---
branches:
  only:
    - master
    - v2
services:
  - mongodb
language: node_js
node_js:
  - "7.9.0"
  - "8.1.3"
sudo: required
env:
  - CXX=g++-4.8
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - gcc-4.8
    - g++-4.8
    - nginx
  hosts:
    - www.koaton.test
    - koaton.test
    - koaton.t3st
    - origin.koaton.test
cache:
  directories:
    - node_modules
before_install:
  - npm config set spin false
  - npm install -g codeclimate-test-reporter
install:
  - npm i .
  - git clone -b v2 https://github.com/gerard2p/koaton-demoapp.git testingapp
  - cd testingapp
  - npm i --only=prod
  - cd ..
  - ln -s . testingapp/node_modules/koaton
script:
  - npm run eslint
  - npm run cover
after_success:
    - npm run export
    - npm run codeclimate:report
    - npm run semantic-release

---
branches:
  only:
    - master
    - v2
services:
  - mongodb
language: node_js
node_js:
  - "7.9.0"
  - "8.1.3"
sudo: required
env:
  - CXX=g++-4.8
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - gcc-4.8
    - g++-4.8
    - nginx
  hosts:
    - www.koaton.test
    - koaton.test
    - koaton.t3st
    - origin.koaton.test
cache:
  directories:
    - node_modules
before_install:
  - npm config set spin false
  - npm install -g semantic-release
  - npm install -g codeclimate-test-reporter
install:
  - npm i .
  - git clone -b v2 https://github.com/gerard2p/koaton-demoapp.git testingapp
  - cd testingapp
  - npm i --only=prod
  - cd ..
  - ln -s . testingapp/node_modules/koaton
script:
  - npm run eslint
  - npm run cover
after_success:
    - npm run export
    - npm run codeclimate:report
    - npm run semantic-release

Update instalation script to add semantic-release
ci(Travis): Update instalation script to add semantic-release
