version: 2
jobs:
  build:
    docker:
      - image: node:dubnium-alpine

    working_directory: ~/repo

    steps:
      - run: npm install -g npm
      - checkout
      - restore_cache:
          keys:
            - v1-dependencies-{{ checksum "package-lock.json" }}
            # fallback to using the latest cache if no exact match is found
            - v1-dependencies-
      - run: npm ci
      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package-lock.json" }}
      - run: npm run build

version: 2.1
jobs:
  build:
    parameters:
      node_image:
        type: string

    docker:
    - image: << parameters.node_image >>

    working_directory: ~/repo

    steps:
      - checkout
      - run: npm ci
      - run: npm run build

workflows:
  build:
    jobs:
      - build:
          name: "carbon"
          node_image: "circleci/node:carbon"
      - build:
          name: "dubnium"
          node_image: "circleci/node:dubnium"
      - build:
          name: "erbium"
          node_image: "circleci/node:erbium"
Build against all LTS versions
Build against all LTS versions
