version: 2
jobs:
  build:
    docker:
      - image: circleci/node:10.15.0
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          keys:
            - v1-dependencies-{{ checksum "package-lock.json" }}
            - v1-dependencies-
      - run: npm install
      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package-lock.json" }}
      # TODO: - run: npm audit
      - run: npm run release
      - run: npm run format:ci
      - run: npm run lint:ci
      - run: npm run test:ci

version: 2

node-base: &node-base
  steps:
    - checkout
    - restore_cache:
        keys:
          - v1-dependencies-{{ checksum "package-lock.json" }}
          - v1-dependencies-
    - run: npm install
    - save_cache:
        paths:
          - node_modules
        key: v1-dependencies-{{ checksum "package-lock.json" }}
    # TODO: - run: npm audit
    - run: npm run release
    - run: npm run format:ci
    - run: npm run lint:ci
    - run: npm run test:ci

jobs:
  test-v8:
    docker:
      - image: circleci/node:8
    <<: *node-base
  test-v10:
    docker:
      - image: circleci/node:10
    <<: *node-base

workflows:
  version: 2
  build:
    jobs:
      - test-v8
      - test-v10

Add test job for v8
Add test job for v8
