version: 2 jobs: build: docker: - image: circleci/node:10.16.3 working_directory: ~/repo steps: - checkout - restore_cache: key: node_modules-{{ checksum "package-lock.json" }} - run: test -d node_modules || npm i - save_cache: key: node_modules-{{ checksum "package-lock.json" }} paths: - node_modules # run tests! - run: npm t || npm t || npm t