# https://circleci.com/docs/install-and-use-yarn/ machine: node: version: 6.11.5 environment: YARN_VERSION: 1.2.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 "Downloading and installing 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 cache_directories: - ~/.cache/yarn - ~/.yarn test: pre: - yarn run audit - yarn run format-ci - yarn run build override: - yarn run test-ci