machine:
  environment:
    PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
    YARN_PATH: "$HOME/.yarn"
  node:
    version: 6.9

dependencies:
  pre:
    - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.27.5
    - yarn --version
    - npm i -g npm@5
  override:
    - yarn install --frozen-lockfile
  cache_directories:
    - ~/.cache
    - ~/.yarn
    - .cache

test:
  override:
    - npm test
  post:
    - bash <(curl -s https://codecov.io/bash)

deployment:
  npm:
    branch: master
    commands:
      - npm run semantic-release || true