<commit_before># set the dist to bionic
dist: bionic
os: linux
language: node_js
node_js: '12.20'
# use a smaller depth for faster builds
git:
  depth: 10

cache:
  npm: false
  yarn: false

before_install: . ./scripts/ci-setup.sh
install:
  - export YARN_SETUP_ARGS="--prod=false --silent"
  - yarn setup

# set up build matrix
# specify jobs (stages are serial, and scripts are parallel within a stage)
jobs:
  # stop if given a reason
  fast_finish: true

  include:
    - stage: "Verify"
      name: 'Verify Build (node 10)'
      # use node 10 to make sure we don't lose compatibility
      node_js: '10.19'
      # run on any pull_request
      if: branch = master AND type IN (pull_request)
      # only cache on verify build
      cache:
        npm: false
        yarn: false
        directories:
          - '$TRAVIS_BUILD_DIR/.eslintcache'
      script:
        - yarn lint
        - yarn sync --verify

    - stage: "Tests"
      name: 'Unit Test Suite (node 10)'
      # use node 10 to make sure we don't lose compatibility
      node_js: '10.19'
      # run only on pull-requests or cron
      if: branch = master AND type IN (pull_request, cron)
      script: yarn --silent test --suite unit-a

    - name: 'Unit Test Suite (node 12)'
      node_js: '12.20'
      # run only on pull-requests or cron
      if: branch = master AND type IN (pull_request, cron)
      script: yarn --silent test --suite unit-b

    - script:
      name: 'ES Test Suite (elasticsearch 6) (node 12)'
      node_js: '12.20'
      # run only on pull-requests and cron
      if: branch = master AND type IN (pull_request, cron)
      script: yarn --silent test --suite elasticsearch --elasticsearch-version 6.8.6 --elasticsearch-api-version 6.5

    - script:
      name: 'ES Test Suite (elasticsearch 7) (node 12)'
      node_js: '12.20'
      # run only on pull-requests
      if: branch = master AND type IN (pull_request) AND commit_message !~ /^WIP/
      script: yarn --silent test --suite elasticsearch --elasticsearch-version 7.2.1 --elasticsearch-api-version 7.0 --report-coverage false

    - script:
      name: 'End-to-End Test Suite (elasticsearch 6) (node 12)'
      node_js: '12.20'
      # run only on pull-requests and cron
      if: branch = master AND type IN (pull_request, cron) AND fork = false
      script:
        - export SERVICE_HEAP_OPTS="-Xms256m -Xmx256m"
        - yarn --silent --cwd e2e test

    - stage: "Releases"
      name: 'Publish prerelease packages and docker image'
      # Run on pull-request and when the commit message includes a prerelease bump
      if: branch = master AND type IN (pull_request) AND commit_message =~ /(bump|release):.*\((premajor|preminor|prepatch|prerelease)\).*/<commit_msg>Increase memory limit of elasticsearch cluster in CI<commit_after># set the dist to bionic
dist: bionic
os: linux
language: node_js
node_js: '12.20'
# use a smaller depth for faster builds
git:
  depth: 10

cache:
  npm: false
  yarn: false

before_install: . ./scripts/ci-setup.sh
install:
  - export YARN_SETUP_ARGS="--prod=false --silent"
  - yarn setup

# set up build matrix
# specify jobs (stages are serial, and scripts are parallel within a stage)
jobs:
  # stop if given a reason
  fast_finish: true

  include:
    - stage: "Verify"
      name: 'Verify Build (node 10)'
      # use node 10 to make sure we don't lose compatibility
      node_js: '10.19'
      # run on any pull_request
      if: branch = master AND type IN (pull_request)
      # only cache on verify build
      cache:
        npm: false
        yarn: false
        directories:
          - '$TRAVIS_BUILD_DIR/.eslintcache'
      script:
        - yarn lint
        - yarn sync --verify

    - stage: "Tests"
      name: 'Unit Test Suite (node 10)'
      # use node 10 to make sure we don't lose compatibility
      node_js: '10.19'
      # run only on pull-requests or cron
      if: branch = master AND type IN (pull_request, cron)
      script: yarn --silent test --suite unit-a

    - name: 'Unit Test Suite (node 12)'
      node_js: '12.20'
      # run only on pull-requests or cron
      if: branch = master AND type IN (pull_request, cron)
      script: yarn --silent test --suite unit-b

    - script:
      name: 'ES Test Suite (elasticsearch 6) (node 12)'
      node_js: '12.20'
      # run only on pull-requests and cron
      if: branch = master AND type IN (pull_request, cron)
      script: yarn --silent test --suite elasticsearch --elasticsearch-version 6.8.6 --elasticsearch-api-version 6.5

    - script:
      name: 'ES Test Suite (elasticsearch 7) (node 12)'
      node_js: '12.20'
      # run only on pull-requests
      if: branch = master AND type IN (pull_request) AND commit_message !~ /^WIP/
      script: yarn --silent test --suite elasticsearch --elasticsearch-version 7.2.1 --elasticsearch-api-version 7.0 --report-coverage false

    - script:
      name: 'End-to-End Test Suite (elasticsearch 6) (node 12)'
      node_js: '12.20'
      # run only on pull-requests and cron
      if: branch = master AND type IN (pull_request, cron) AND fork = false
      script: yarn --silent --cwd e2e test

    - stage: "Releases"
      name: 'Publish prerelease packages and docker image'
      # Run on pull-request and when the commit message includes a prerelease bump
      if: branch = master AND type IN (pull_request) AND commit_message =~ /(bump|release):.*\((premajor|preminor|prepatch|prerelease)\).*/
{'fraction_non_alphanumeric': 0.1005514705882353, 'fraction_numerical': 0.023161764705882354, 'mean_word_length': 2.4811260396673065, 'pattern_counts': {'":': 0, '<': 3, '<?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': '556877', 'n_tokens_mistral': 1810, 'n_tokens_neox': 1669, 'n_words': 639}