version: 2
jobs:
  build:
    working_directory: ~/repo
    docker:
      - image: node:12.16.1
    steps:
      - checkout
      - restore_cache:
          key: yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}
      - run: yarn install
      - save_cache:
          paths:
            - node_modules
          key: yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}
      - run: yarn build
      - persist_to_workspace:
          root: .
          paths:
            - .
  test:
    working_directory: ~/repo
    docker:
      - image: node:12.16.1
    steps:
      - attach_workspace:
          at: .
      - run: yarn test
workflows:
  version: 2
  build_and_test:
    jobs:
      - build
      - test:
          requires:
            - build

version: 2
jobs:
  build:
    working_directory: ~/repo
    docker:
      - image: node:12.16.3
    steps:
      - checkout
      - restore_cache:
          key: yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}
      - run: yarn install
      - save_cache:
          paths:
            - node_modules
          key: yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}
      - run: yarn build
      - persist_to_workspace:
          root: .
          paths:
            - .
  test:
    working_directory: ~/repo
    docker:
      - image: node:12.16.3
    steps:
      - attach_workspace:
          at: .
      - run: yarn test
workflows:
  version: 2
  build_and_test:
    jobs:
      - build
      - test:
          requires:
            - build

Update node Docker tag to v12.16.3
Update node Docker tag to v12.16.3
