# Javascript Node CircleCI 2.0 configuration file
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
version: 2
jobs:
  build-and-test:
    docker:
      - image: circleci/node:8.10-browsers
    working_directory: ~/insight
    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - dependency-cache-{{ checksum "package.json" }}
      - run: npm install
      - save_cache:
          paths:
            - node_modules
          key: dependency-cache-{{ checksum "package.json" }}

      # run tests
      - run: npm run test:ci

workflows:
  version: 2
  build_and_test:
    jobs:
      - build-and-test
