version: 2
jobs:
  build:
    docker:
      - image: circleci/node:8
    steps:
      - checkout
      - restore_cache:
          keys:
          - dependencies-{{ checksum "yarn.lock" }}
      - run:
          name: Install
          command: yarn install --pure-lockfile
      - save_cache:
          paths:
            - node_modules
          key: dependencies-{{ checksum "yarn.lock" }}
      - run:
          name: Check Prettier, ESLint, Flow
          command: yarn ci-check