version: 2.1 workflows: build_and_lint: jobs: - build - lint: requires: - build - test: requires: - build jobs: build: docker: - image: "circleci/node:12" steps: - checkout - restore_cache: key: yarn-packagesV2-{{ checksum "yarn.lock" }} - run: yarn global add node-gyp && yarn install - save_cache: key: yarn-packagesV2-{{ checksum "yarn.lock" }} paths: - ./node_modules lint: docker: - image: "circleci/node:12" steps: - checkout - restore_cache: key: yarn-packagesV2-{{ checksum "yarn.lock" }} - run: yarn lint && yarn format:check test: docker: - image: "circleci/node:12" steps: - checkout - restore_cache: key: yarn-packagesV2-{{ checksum "yarn.lock" }} - run: yarn test:ci