<commit_before># Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

branches:
  only:
  - master
  - /^\d+\.\d+\.\d+(-\S*)?$/ # release branches

language: java

dist: xenial

jdk:
  - openjdk8

cache:
  directories:
    - $HOME/.m2

env:
  global:
    - DOCKER_IP=127.0.0.1  # for integration tests
    - MVN="mvn -B"
    - > # Various options to make execution of maven goals faster (e.g., mvn install)
      MAVEN_SKIP="-P skip-static-checks -Dweb.console.skip=true -Dmaven.javadoc.skip=true"
    - MAVEN_SKIP_TESTS="-P skip-tests"

addons:
  apt:
    packages:
      - maven
      - python3

# Add various options to make 'mvn install' fast and skip javascript compile (-Dweb.console.skip=true) since it is not
# needed. Depending on network speeds, "mvn -q install" may take longer than the default 10 minute timeout to print any
# output.  To compensate, use travis_wait to extend the timeout.
install: ./check_test_suite.py && travis_terminate 0  || echo 'Running Maven install...' && MAVEN_OPTS='-Xmx3000m' travis_wait 15 ${MVN} clean install -q -ff -pl '!distribution,!:druid-it-image,!:druid-it-cases' ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C && ${MVN} install -q -ff -pl 'distribution' ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS}

# There are 3 stages of tests
# 1. Tests - phase 1
# 2. Tests - phase 2
# 3. cron
#
# The cron type only runs jobs that are marked with stage cron. The cron stage also runs alongside
# phase 1 and phase 2 for commit builds on release branches.
# The test type is split into 2 stages. This is done so that more PRs can run their validation
# in parallel. The first phase is meant to include sanity test jobs. The jobs in this phase are
# meant to be fast. The second phase is meant to run all other tests. Cron stage does not run on pull requests.
# Jobs with known flaky tests should be put in the second phase since the second phase will not
# start if there are any failures in the second stage.
stages:
  - name: Tests - phase 1
    if: type != cron
  - name: Tests - phase 2
    if: type != cron
  - name: cron
    if: type = cron OR (type != pull_request AND branch != master)

jobs:
  include:
    - name: "animal sniffer checks"
      stage: Tests - phase 1
      script: ${MVN} animal-sniffer:check --fail-at-end

    - name: "checkstyle"
      script: ${MVN} checkstyle:checkstyle --fail-at-end

    - name: "enforcer checks"
      script: ${MVN} enforcer:enforce --fail-at-end

    - name: "forbidden api checks"
      script: ${MVN} forbiddenapis:check forbiddenapis:testCheck --fail-at-end

    - name: "pmd checks"
      script: ${MVN} pmd:check --fail-at-end  # TODO: consider adding pmd:cpd-check

    - name: "spotbugs checks"
      script: ${MVN} spotbugs:check --fail-at-end -pl '!benchmarks'

    - name: "license checks"
      before_script: &setup_generate_license
        - sudo apt-get update && sudo apt-get install python3 python3-pip python3-setuptools -y
        - ./check_test_suite.py && travis_terminate 0 || echo 'Continuing setup'
        - pip3 install wheel  # install wheel first explicitly
        - pip3 install pyyaml==5.4.1
      script:
        - >
          ${MVN} apache-rat:check -Prat --fail-at-end
          -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
          -Drat.consoleOutput=true
        # Generate dependency reports and checks they are valid. When running on Travis CI, 2 cores are available
        # (https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system).
        - mkdir -p target
        - distribution/bin/generate-license-dependency-reports.py . target --clean-maven-artifact-transfer --parallel 2
        - distribution/bin/check-licenses.py licenses.yaml target/license-reports<commit_msg>Another simpler attempt to fix travis build (#13257)<commit_after># Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

branches:
  only:
  - master
  - /^\d+\.\d+\.\d+(-\S*)?$/ # release branches

language: java

dist: xenial

jdk:
  - openjdk8

cache:
  directories:
    - $HOME/.m2

env:
  global:
    - DOCKER_IP=127.0.0.1  # for integration tests
    - MVN="mvn -B"
    - > # Various options to make execution of maven goals faster (e.g., mvn install)
      MAVEN_SKIP="-P skip-static-checks -Dweb.console.skip=true -Dmaven.javadoc.skip=true"
    - MAVEN_SKIP_TESTS="-P skip-tests"

addons:
  apt:
    packages:
      - maven
      - python3

# Add various options to make 'mvn install' fast and skip javascript compile (-Dweb.console.skip=true) since it is not
# needed. Depending on network speeds, "mvn -q install" may take longer than the default 10 minute timeout to print any
# output.  To compensate, use travis_wait to extend the timeout.
install: ./check_test_suite.py && travis_terminate 0  || echo 'Running Maven install...' && MAVEN_OPTS='-Xmx3000m' travis_wait 15 ${MVN} clean install -q -ff -pl '!distribution,!:druid-it-image,!:druid-it-cases' ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C && ${MVN} install -q -ff -pl 'distribution' ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS}

# There are 3 stages of tests
# 1. Tests - phase 1
# 2. Tests - phase 2
# 3. cron
#
# The cron type only runs jobs that are marked with stage cron. The cron stage also runs alongside
# phase 1 and phase 2 for commit builds on release branches.
# The test type is split into 2 stages. This is done so that more PRs can run their validation
# in parallel. The first phase is meant to include sanity test jobs. The jobs in this phase are
# meant to be fast. The second phase is meant to run all other tests. Cron stage does not run on pull requests.
# Jobs with known flaky tests should be put in the second phase since the second phase will not
# start if there are any failures in the second stage.
stages:
  - name: Tests - phase 1
    if: type != cron
  - name: Tests - phase 2
    if: type != cron
  - name: cron
    if: type = cron OR (type != pull_request AND branch != master)

jobs:
  include:
    - name: "animal sniffer checks"
      stage: Tests - phase 1
      script: ${MVN} animal-sniffer:check --fail-at-end

    - name: "checkstyle"
      script: ${MVN} checkstyle:checkstyle --fail-at-end

    - name: "enforcer checks"
      script: ${MVN} enforcer:enforce --fail-at-end

    - name: "forbidden api checks"
      script: ${MVN} forbiddenapis:check forbiddenapis:testCheck --fail-at-end

    - name: "pmd checks"
      script: ${MVN} pmd:check --fail-at-end  # TODO: consider adding pmd:cpd-check

    - name: "spotbugs checks"
      script: ${MVN} spotbugs:check --fail-at-end -pl '!benchmarks'

    - name: "license checks"
      before_script: &setup_generate_license
        - sudo apt-get update && sudo apt-get install python3 -y
        - curl https://bootstrap.pypa.io/pip/3.5/get-pip.py | sudo -H python3
        - ./check_test_suite.py && travis_terminate 0 || echo 'Continuing setup'
        - pip3 install wheel  # install wheel first explicitly
        - pip3 install --upgrade pyyaml
      script:
        - >
          ${MVN} apache-rat:check -Prat --fail-at-end
          -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
          -Drat.consoleOutput=true
        # Generate dependency reports and checks they are valid. When running on Travis CI, 2 cores are available
        # (https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system).
        - mkdir -p target
        - distribution/bin/generate-license-dependency-reports.py . target --clean-maven-artifact-transfer --parallel 2
        - distribution/bin/check-licenses.py licenses.yaml target/license-reports
{'fraction_non_alphanumeric': 0.10082462891698736, 'fraction_numerical': 0.010885101704233095, 'mean_word_length': 3.0825852782764813, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, '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': '1484895', 'n_tokens_mistral': 2909, 'n_tokens_neox': 2725, 'n_words': 1040}