version: 2
jobs:
  build:
    working_directory: ~/mern-starter
    docker:
      - image: circleci/node:6.11.1
    steps:
      - checkout
      - run:
          name: install-npm
          command: yarn install --no-lockfile
      - save_cache:
          key: dependency-cache-{{ checksum "package.json" }}
          paths:
            - ./node_modules
      - run:
          name: test
          command: npm test
