<commit_before>general:
  branches:
    ignore:
      - gh-pages

machine:
  node:
    version: 6
  environment:
    YARN_VERSION: 0.18.1
    PATH: "${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"

dependencies:
  pre:
    - |
      if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then
        echo "Download and install Yarn."
        curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
      else
        echo "The correct version of Yarn is already installed."
      fi
  override:
    - yarn install
  cache_directories:
    - ~/.yarn
    - ~/.cache/yarn

test:
  pre:
    - mkdir $CIRCLE_TEST_REPORTS/karma
    - mkdir $CIRCLE_TEST_REPORTS/lint
  override:
    - yarn test -- --single-run
    - yarn lint -- --formatters-dir ./tslint-formatters --format junit -o $CIRCLE_TEST_REPORTS/lint/tslint.xml
  post:
    - mv test-results.xml $CIRCLE_TEST_REPORTS/karma

deployment:
  production:
    branch: master
    commands:
      - cd demo-app && yarn install && yarn gh-pages:deploy<commit_msg>Fix CircleCI configuration<commit_after>general:
  branches:
    ignore:
      - gh-pages

machine:
  node:
    version: 6
  environment:
    YARN_VERSION: 0.18.1
    PATH: "${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"

dependencies:
  pre:
    - |
      if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then
        echo "Download and install Yarn."
        curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
      else
        echo "The correct version of Yarn is already installed."
      fi
  override:
    - yarn install
  cache_directories:
    - ~/.yarn
    - ~/.cache/yarn

test:
  pre:
    - mkdir $CIRCLE_TEST_REPORTS/karma
    - mkdir $CIRCLE_TEST_REPORTS/lint
  override:
    - yarn test -- --single-run
    - yarn lint -- --formatters-dir ./tslint-formatters --format junit -o $CIRCLE_TEST_REPORTS/lint/tslint.xml
  post:
    - mv test-results.xml $CIRCLE_TEST_REPORTS/karma
{'fraction_non_alphanumeric': 0.14181641573579407, 'fraction_numerical': 0.0048567265662943174, 'mean_word_length': 2.3937397034596377, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1583991', 'n_tokens_mistral': 777, 'n_tokens_neox': 748, 'n_words': 160}