version: 2
jobs:
  test:
    docker:
      - image: circleci/node:12-stretch
    steps:
      - checkout
      - restore_cache:
          key: dependency-cache-{{ checksum "package.json" }}
      - run:
          name: Installing Dependencies
          command: npm install
      - save_cache:
          key: dependency-cache-{{ checksum "package.json" }}
          paths:
            - node_modules
      - run:
          name: Running Mocha Integration Tests
          command: npm test && npm run integration-test
workflows:
  version: 2
  build_and_test:
    jobs:
      - test
