version: 2
jobs:
  build:
    working_directory: ~/styled-material-components
    docker:
      - image: node:carbon
    steps:
      - checkout
      - restore_cache:
          keys:
            - styled-material-components-{{ checksum "yarn.lock" }}-{{ .Branch }}
            - styled-material-components-{{ checksum "yarn.lock" }}
      - run: yarn install
      - save_cache:
          key: styled-material-components-{{ checksum "yarn.lock" }}-{{ .Branch }}
          paths:
            - "/node_modules"
      - run: yarn run lint
      - run: yarn danger ci

