version: 2
jobs:
  build:
    docker:
      - image: circleci/node:latest-browsers
    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "package.json" }}
          - v1-dependencies-
      - run: npm install
      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}
      - run: npm run build && git diff --exit-code
      - run: npm test -- --browsers ChromeHeadless,Firefox
      - run: test -z "$CIRCLE_PULL_REQUEST" && ./node_modules/.bin/codecov

version: 2
jobs:
  build:
    docker:
      - image: circleci/node:latest-browsers
    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "package.json" }}
          - v1-dependencies-
      - run: npm install
      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}
      - run: npm run build && git diff --exit-code -- :^package-lock.json
      - run: npm test -- --browsers ChromeHeadless,Firefox
      - run: test -z "$CIRCLE_PULL_REQUEST" && ./node_modules/.bin/codecov

Allow package-lock.json to be modified in CI
Allow package-lock.json to be modified in CI
