<commit_before>language: java

env:
  global:
    - MAVEN_OPTS="-Xmx512M -XX:+ExitOnOutOfMemoryError"
    - MAVEN_SKIP_CHECKS_AND_DOCS="-Dair.check.skip-all=true -Dmaven.javadoc.skip=true"
    - MAVEN_FAST_INSTALL="-DskipTests $MAVEN_SKIP_CHECKS_AND_DOCS -B -q -T C1"
    - ARTIFACTS_UPLOAD_PATH_BRANCH=travis_build_artifacts/${TRAVIS_REPO_SLUG}/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}
    - ARTIFACTS_UPLOAD_PATH_PR=travis_build_artifacts_pr/${TRAVIS_REPO_SLUG}/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}
    - TEST_FLAGS=""
  matrix:
    - MAVEN_CHECKS=true
    - WEBUI_CHECKS=true
    - TEST_SPECIFIC_MODULES=presto-tests
    - TEST_SPECIFIC_MODULES=presto-tests TEST_FLAGS="-P ci-only"
    - TEST_SPECIFIC_MODULES=presto-raptor-legacy
    - TEST_SPECIFIC_MODULES=presto-accumulo
    - TEST_SPECIFIC_MODULES=presto-cassandra
    - TEST_SPECIFIC_MODULES=presto-hive
    - TEST_SPECIFIC_MODULES=presto-main
    - TEST_SPECIFIC_MODULES=presto-mongodb
    - TEST_OTHER_MODULES=!presto-tests,!presto-raptor-legacy,!presto-accumulo,!presto-cassandra,!presto-hive,!presto-kudu,!presto-docs,!presto-server,!presto-server-rpm,!presto-main,!presto-mongodb
    - PRODUCT_TESTS_BASIC_ENVIRONMENT=true
    - PRODUCT_TESTS_SPECIFIC_ENVIRONMENT=true
    - PRODUCT_TESTS_SPECIFIC_ENVIRONMENT_2=true
    - HIVE_TESTS=true
    - KUDU_TESTS=true

sudo: required
dist: trusty

cache:
  yarn: true
  directories:
    - $HOME/.m2/repository

services:
  - docker

install:
  - ./mvnw -v
  - |
    if [[ -v TEST_SPECIFIC_MODULES ]]; then
      ./mvnw install $MAVEN_FAST_INSTALL -pl $TEST_SPECIFIC_MODULES -am
    fi
  - |
    if [[ -v TEST_OTHER_MODULES ]]; then
      ./mvnw install $MAVEN_FAST_INSTALL -pl '!presto-docs,!presto-server,!presto-server-rpm'
    fi
  - |
    if [[ -v PRODUCT_TESTS_BASIC_ENVIRONMENT || -v PRODUCT_TESTS_SPECIFIC_ENVIRONMENT || -v PRODUCT_TESTS_SPECIFIC_ENVIRONMENT_2 ]]; then
      ./mvnw install $MAVEN_FAST_INSTALL -pl '!presto-docs,!presto-server-rpm'
    fi
  - |<commit_msg>Use Xenial environment on Travis<commit_after>language: java

env:
  global:
    - MAVEN_OPTS="-Xmx512M -XX:+ExitOnOutOfMemoryError"
    - MAVEN_SKIP_CHECKS_AND_DOCS="-Dair.check.skip-all=true -Dmaven.javadoc.skip=true"
    - MAVEN_FAST_INSTALL="-DskipTests $MAVEN_SKIP_CHECKS_AND_DOCS -B -q -T C1"
    - ARTIFACTS_UPLOAD_PATH_BRANCH=travis_build_artifacts/${TRAVIS_REPO_SLUG}/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}
    - ARTIFACTS_UPLOAD_PATH_PR=travis_build_artifacts_pr/${TRAVIS_REPO_SLUG}/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}
    - TEST_FLAGS=""
  matrix:
    - MAVEN_CHECKS=true
    - WEBUI_CHECKS=true
    - TEST_SPECIFIC_MODULES=presto-tests
    - TEST_SPECIFIC_MODULES=presto-tests TEST_FLAGS="-P ci-only"
    - TEST_SPECIFIC_MODULES=presto-raptor-legacy
    - TEST_SPECIFIC_MODULES=presto-accumulo
    - TEST_SPECIFIC_MODULES=presto-cassandra
    - TEST_SPECIFIC_MODULES=presto-hive
    - TEST_SPECIFIC_MODULES=presto-main
    - TEST_SPECIFIC_MODULES=presto-mongodb
    - TEST_OTHER_MODULES=!presto-tests,!presto-raptor-legacy,!presto-accumulo,!presto-cassandra,!presto-hive,!presto-kudu,!presto-docs,!presto-server,!presto-server-rpm,!presto-main,!presto-mongodb
    - PRODUCT_TESTS_BASIC_ENVIRONMENT=true
    - PRODUCT_TESTS_SPECIFIC_ENVIRONMENT=true
    - PRODUCT_TESTS_SPECIFIC_ENVIRONMENT_2=true
    - HIVE_TESTS=true
    - KUDU_TESTS=true

dist: xenial
jdk: openjdk8

cache:
  yarn: true
  directories:
    - $HOME/.m2/repository

install:
  - ./mvnw -v
  - |
    if [[ -v TEST_SPECIFIC_MODULES ]]; then
      ./mvnw install $MAVEN_FAST_INSTALL -pl $TEST_SPECIFIC_MODULES -am
    fi
  - |
    if [[ -v TEST_OTHER_MODULES ]]; then
      ./mvnw install $MAVEN_FAST_INSTALL -pl '!presto-docs,!presto-server,!presto-server-rpm'
    fi
  - |
    if [[ -v PRODUCT_TESTS_BASIC_ENVIRONMENT || -v PRODUCT_TESTS_SPECIFIC_ENVIRONMENT || -v PRODUCT_TESTS_SPECIFIC_ENVIRONMENT_2 ]]; then
      ./mvnw install $MAVEN_FAST_INSTALL -pl '!presto-docs,!presto-server-rpm'
    fi
  - |
{'fraction_non_alphanumeric': 0.11575239053850025, 'fraction_numerical': 0.00377453447408153, 'mean_word_length': 4.189295039164491, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6217486', 'n_tokens_mistral': 1769, 'n_tokens_neox': 1749, 'n_words': 172}