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

dependencies:
  pre:
    - curl -o- -L https://yarnpkg.com/install.sh | bash
    - yarn --version
  override:
    - yarn install --frozen-lockfile
  cache_directories:
    - ~/.cache
    - ~/.yarn
    - .cache

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

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