general:
  branches:
    ignore:
      - gh-pages

machine:
  pre:
    - mkdir ~/.yarn-cache
  node:
    version: stable
  environment:
    YARN_VERSION: 0.19.1
    PATH: "${PATH}:${HOME}/.yarn/bin"

dependencies:
  pre:
    - |
      if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then
          curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
      fi
  cache_directories:
    - ~/.yarn
    - ~/.yarn-cache
  override:
    - yarn install

test:
  override:
    - yarn run test-all
