<commit_before>aliases:
  - &install_yarn_version
    name: Install specific Yarn version
    command: |
      curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0
      echo 'export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"' >> $BASH_ENV

  - &restore_yarn_cache
    name: Restore Yarn cache
    keys:
      - yarn-{{ .Branch }}-packages-{{ checksum "yarn.lock" }}

  - &save_yarn_cache
    name: Save Yarn cache
    key: yarn-{{ .Branch }}-packages-{{ checksum "yarn.lock" }}
    paths:
      - ~/.cache/yarn

  - &run_yarn_install
    name: Install dependencies
    command: yarn install

defaults: &defaults
  working_directory: ~/instantsearchjs
  docker:
    - image: circleci/node:8.16.2@sha256:f8acfc2be7341abadf4c7b5f303b0877c5e0d8ba12392d6d88ecd983f533e37b

version: 2
jobs:
  test_build:
    <<: *defaults
    steps:
      - checkout
      - run: *install_yarn_version
      - restore_cache: *restore_yarn_cache
      - run: *run_yarn_install
      - save_cache: *save_yarn_cache
      - run:
          name: Build & Test packages size
          command: |
            yarn run build
            yarn run test:size

  test_lint:
    <<: *defaults<commit_msg>chore(deps): update circleci/node:8.16.2 docker digest to 3bea0… (#4209)<commit_after>aliases:
  - &install_yarn_version
    name: Install specific Yarn version
    command: |
      curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0
      echo 'export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"' >> $BASH_ENV

  - &restore_yarn_cache
    name: Restore Yarn cache
    keys:
      - yarn-{{ .Branch }}-packages-{{ checksum "yarn.lock" }}

  - &save_yarn_cache
    name: Save Yarn cache
    key: yarn-{{ .Branch }}-packages-{{ checksum "yarn.lock" }}
    paths:
      - ~/.cache/yarn

  - &run_yarn_install
    name: Install dependencies
    command: yarn install

defaults: &defaults
  working_directory: ~/instantsearchjs
  docker:
    - image: circleci/node:8.16.2@sha256:3bea025cdb2ebed53d096b96ba81d2949aec622b454077b4629ca1595f6723d1

version: 2
jobs:
  test_build:
    <<: *defaults
    steps:
      - checkout
      - run: *install_yarn_version
      - restore_cache: *restore_yarn_cache
      - run: *run_yarn_install
      - save_cache: *save_yarn_cache
      - run:
          name: Build & Test packages size
          command: |
            yarn run build
            yarn run test:size

  test_lint:
    <<: *defaults
{'fraction_non_alphanumeric': 0.12044817927170869, 'fraction_numerical': 0.04361744697879152, 'mean_word_length': 2.586800573888092, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '469298', 'n_tokens_mistral': 970, 'n_tokens_neox': 888, 'n_words': 182}