machine:
  environment:
    YARN_VERSION: 0.19.1
    PATH: "${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"

dependencies:
  pre:
    - |
      if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then
        echo "Download and install Yarn."
        curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
      else
        echo "The correct version of Yarn is already installed."
      fi
  override:
    - yarn install
    - lerna bootstrap
  post:
    - yarn global add codecov
  cache_directories:
    - ~/.yarn
    - ~/.cache/yarn

test:
  override:
    - yarn run test
    - if [[ -e junitresults.xml ]]; then cp junitresults.xml $CIRCLE_TEST_REPORTS/test-results.xml; fi
  post:
    - yarn run semantic-release || true
    - codecov

machine:
    version: 6.1.0

dependencies:
  override:
    - yarn install
    - lerna bootstrap
  post:
    - yarn global add codecov

test:
  override:
    - yarn test
    - if [[ -e junitresults.xml ]]; then cp junitresults.xml $CIRCLE_TEST_REPORTS/test-results.xml; fi
  post:
    - yarn run semantic-release || true
    - codecov

Set minimal nodejs version to 6.1.0
chore(build): Set minimal nodejs version to 6.1.0
