version: 2.1
commands:
  yarn-install:
    steps:
      - restore_cache:
          keys:
            # when lock file changes, use increasingly general patterns to restore cache
            - yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
            - yarn-packages-v1-{{ .Branch }}-
            - yarn-packages-v1-
      - run: "echo \"//npm.fontawesome.com/:_authToken=$FONTAWESOME_AUTH_TOKEN\" >> .npmrc"
      - run: "echo \"//npm.pkg.github.com/:_authToken=$GITHUB_PACKAGE_TOKEN\" >> .npmrc"
      - run: yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
      - save_cache:
          paths:
            - ~/.cache/yarn
          key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
jobs:
  test:
    parallelism: 1
    docker:
      - image: circleci/node:14.0.0
    steps:
      - checkout
      - yarn-install
      - run: yarn test
  deploy:
    parallelism: 1
    docker:
      - image: circleci/node:14.0.0
    steps:
      - checkout
      - yarn-install
      - run: yarn build
      - run: yarn deploy
workflows:
  version: 2.1
  test_and_deploy:
    jobs:
      - test
      - deploy:
          requires:
            - test
          filters:
            branches:
              only:
                - master

version: 2.1
commands:
  yarn-install:
    steps:
      - restore_cache:
          keys:
            # when lock file changes, use increasingly general patterns to restore cache
            - yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
            - yarn-packages-v1-{{ .Branch }}-
            - yarn-packages-v1-
      - run: "echo \"//npm.fontawesome.com/:_authToken=$FONTAWESOME_AUTH_TOKEN\" >> .npmrc"
      - run: "echo \"//npm.pkg.github.com/:_authToken=$GITHUB_PACKAGE_TOKEN\" >> .npmrc"
      - run: yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
      - save_cache:
          paths:
            - ~/.cache/yarn
          key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
jobs:
  test:
    parallelism: 1
    resource_class: small
    docker:
      - image: circleci/node:14.0.0
    steps:
      - checkout
      - yarn-install
      - run: yarn test
  deploy:
    parallelism: 1
    resource_class: small
    docker:
      - image: circleci/node:14.0.0
    steps:
      - checkout
      - yarn-install
      - run: yarn build
      - run: yarn deploy
workflows:
  version: 2.1
  test_and_deploy:
    jobs:
      - test
      - deploy:
          requires:
            - test
          filters:
            branches:
              only:
                - master

Move to small boxes in Circle to save 6026
Move to small boxes in Circle to save 6026
