version: 2 defaults: &defaults working_directory: ~/repo docker: - image: circleci/node:8.9.1 jobs: test: <<: *defaults steps: - checkout - restore_cache: keys: - v1-dependencies-{{ checksum "yarn.lock" }} # fallback to using the latest cache if no exact match is found - v1-dependencies- - run: name: Install and build package command: yarn install --frozen-lockfile - run: name: "Lint" command: yarn lint:all - run: name: Coverage command: yarn test:coverage --runInBand --no-cache - run: name: Unit tests command: yarn test --runInBand --no-cache - save_cache: paths: - node_modules key: v1-dependencies-{{ checksum "yarn.lock" }} workflows: version: 2 build_test: jobs: - test