version: 2.1 jobs: build: docker: - image: "circleci/node:12" # the primary container, where your job's commands are run steps: - checkout # check out the code in the project directory - restore_cache: key: yarn-V1-packages-{{ checksum "yarn.lock" }} - run: yarn global add node-gyp && yarn install - save_cache: key: yarn-V1-packages-{{ checksum "yarn.lock" }} paths: - ~/.node_modules lint: docker: - image: "circleci/node:12" # the primary container, where your job's commands are run steps: - checkout # check out the code in the project directory - restore_cache: key: yarn-V1-packages-{{ checksum "yarn.lock" }} - run: yarn lint && yarn format:check - save_cache: key: yarn-V1-packages-{{ checksum "yarn.lock" }} paths: - ~/.node_modules