version: 2
jobs:
  build:
    docker:
      - image: circleci/node:8.0.0
    working_directory: ~/redux-json-api-handlers
    steps:
      - checkout
      - restore_cache:
          key: dependency-cache-{{ checksum "package.json" }}
      - run:
          name: Install dependencies
          command: npm install
      - run:
          name: Lint
          command: npm run lint
      - run:
          name: Test
          command: npm run test
      - run:
          name: Coverage
          command: npm run test:cov
      - run:
          name: Build
          command: npm run build
      - save_cache:
          key: dependency-cache-{{ checksum "package.json" }}
          paths:
            - node_modules
