<commit_before>---
version: 2

references:
  filter_all: &filter_all
    filters:
      branches:
        only: /.*/
      tags:
        only: /.*/

  filter_stg: &filter_stg
    filters:
      branches:
        only: master
      tags:
        only: stg

  filter_prd: &filter_prd
    filters:
      branches:
        ignore: /.*/
      tags:
        only: /v[0-9]+\.[0-9]+\.[0-9]+/

general:
  artifacts:
    - coverage

jobs:
  test_node10:
    docker:
      - image: circleci/node:10
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          keys:
          - v3-node10-dependencies-{{ checksum "package.json" }}
          - v3-node10-dependencies-
      - run: npm install
      - save_cache:
          paths:
            - node_modules
          key: v3-node10-dependencies-{{ checksum "package.json" }}
      - run: npm test -- --maxWorkers=4
      - run: npm run build

  test_node12:
    docker:
      - image: circleci/node:12
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          keys:
          - v3-node12-dependencies-{{ checksum "package.json" }}
          - v3-node12-dependencies-
      - run: npm install
      - save_cache:
          paths:
            - node_modules
          key: v3-node12-dependencies-{{ checksum "package.json" }}
      - run: npm test -- --maxWorkers=4
      - run: npm run build
      - run: cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

  test_node14:
    docker:
      - image: circleci/node:14
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          keys:
          - v3-node14-dependencies-{{ checksum "package.json" }}
          - v3-node14-dependencies-
      - run: npm install
      - save_cache:
          paths:
            - node_modules
          key: v3-node14-dependencies-{{ checksum "package.json" }}
      - run: npm test -- --maxWorkers=4
      - run: npm run build

  deploy_docs:
    docker:
      - image: circleci/node:14
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          key: v3-website-dependencies-{{ checksum "website/package.json" }}
      - run:
          name: Build
          command: |
            sudo apt-get -y install awscli
            bash ./.circleci/scripts/deploy-docs.sh
      - save_cache:
          key: v3-website-dependencies-{{ checksum "website/package.json" }}
          paths:
            - website/node_modules

workflows:
  version: 2
  test:
    jobs:
      - test_node10:
          <<: *filter_all
      - test_node12:
          <<: *filter_all
      - test_node14:
          <<: *filter_all
      - deploy_docs:
          <<: *filter_stg
          requires:
            - test_node12
            - test_node14<commit_msg>adds documentation context to circleci build<commit_after>---
version: 2

references:
  filter_all: &filter_all
    filters:
      branches:
        only: /.*/
      tags:
        only: /.*/

  filter_stg: &filter_stg
    filters:
      branches:
        only: master
      tags:
        only: stg

  filter_prd: &filter_prd
    filters:
      branches:
        ignore: /.*/
      tags:
        only: /v[0-9]+\.[0-9]+\.[0-9]+/

general:
  artifacts:
    - coverage

jobs:
  test_node10:
    docker:
      - image: circleci/node:10
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          keys:
          - v3-node10-dependencies-{{ checksum "package.json" }}
          - v3-node10-dependencies-
      - run: npm install
      - save_cache:
          paths:
            - node_modules
          key: v3-node10-dependencies-{{ checksum "package.json" }}
      - run: npm test -- --maxWorkers=4
      - run: npm run build

  test_node12:
    docker:
      - image: circleci/node:12
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          keys:
          - v3-node12-dependencies-{{ checksum "package.json" }}
          - v3-node12-dependencies-
      - run: npm install
      - save_cache:
          paths:
            - node_modules
          key: v3-node12-dependencies-{{ checksum "package.json" }}
      - run: npm test -- --maxWorkers=4
      - run: npm run build
      - run: cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

  test_node14:
    docker:
      - image: circleci/node:14
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          keys:
          - v3-node14-dependencies-{{ checksum "package.json" }}
          - v3-node14-dependencies-
      - run: npm install
      - save_cache:
          paths:
            - node_modules
          key: v3-node14-dependencies-{{ checksum "package.json" }}
      - run: npm test -- --maxWorkers=4
      - run: npm run build

  deploy_docs:
    docker:
      - image: circleci/node:14
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          key: v3-website-dependencies-{{ checksum "website/package.json" }}
      - run:
          name: Build
          command: |
            sudo apt-get -y install awscli
            bash ./.circleci/scripts/deploy-docs.sh
      - save_cache:
          key: v3-website-dependencies-{{ checksum "website/package.json" }}
          paths:
            - website/node_modules

workflows:
  version: 2
  test:
    jobs:
      - test_node10:
          <<: *filter_all
      - test_node12:
          <<: *filter_all
      - test_node14:
          <<: *filter_all
      - deploy_docs:
          <<: *filter_stg
          context:
            - Documentation
          requires:
            - test_node12
            - test_node14
{'fraction_non_alphanumeric': 0.11575221238938053, 'fraction_numerical': 0.02265486725663717, 'mean_word_length': 1.5295434198746642, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '1028525', 'n_tokens_mistral': 1909, 'n_tokens_neox': 1788, 'n_words': 364}