<commit_before>name: CI

on: [push, pull_request]

env:
  MAVEN_OPTS: -Xmx512M -XX:+ExitOnOutOfMemoryError
  MAVEN_INSTALL_OPTS: -Xmx2G -XX:+ExitOnOutOfMemoryError
  MAVEN_FAST_INSTALL: -B -V -T C1 -DskipTests -Dair.check.skip-all

jobs:
  maven-checks:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Install Maven Wrapper
        run: ./mvnw -v
      - name: Maven Checks
        run: |
          MAVEN_OPTS=$MAVEN_INSTALL_OPTS
          mvn install -B -V -T C1 -DskipTests -P ci -pl '!presto-server-rpm'
      - name: Test Server RPM
        run: |
          MAVEN_OPTS=$MAVEN_INSTALL_OPTS
          mvn install -B -P ci -pl presto-server-rpm
      - name: Test Docker Image
        run: docker/build-local.sh

  web-ui-checks:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Web UI Checks
        run: presto-main/bin/check_webui.sh

  hive-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Install Hive Module
        run: |
          MAVEN_OPTS=$MAVEN_INSTALL_OPTS
          mvn install $MAVEN_FAST_INSTALL -pl presto-hive-hadoop2 -am
      - name: Run Hive Tests
        run: |
          source presto-product-tests/conf/product-tests-config-empty.sh &&
            presto-hive-hadoop2/bin/run_hive_tests.sh

  kudu-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Install Kudu Module
        run: |
          MAVEN_OPTS=$MAVEN_INSTALL_OPTS
          mvn install $MAVEN_FAST_INSTALL -pl presto-kudu -am
      - name: Run Kudu Tests -- disable InferSchema
        run: presto-kudu/bin/run_kudu_tests.sh "null"
      - name: Run Kudu Tests -- enable InferSchema, empty prefix
        run: presto-kudu/bin/run_kudu_tests.sh ""
      - name: Run Kudu Tests -- enable InferSchema, standard prefix
        run: presto-kudu/bin/run_kudu_tests.sh "presto::"

  presto-tests-ci-only:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Maven Install
        run: |
          MAVEN_OPTS=$MAVEN_INSTALL_OPTS
          mvn install $MAVEN_FAST_INSTALL -pl presto-tests -am
      - name: Maven Tests
        run: mvn test -B -Dair.check.skip-all -pl presto-tests -P ci-only

  test-other-modules:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Maven Install
        run: |
          MAVEN_OPTS=$MAVEN_INSTALL_OPTS
          mvn install $MAVEN_FAST_INSTALL -pl '!presto-docs,!presto-server,!presto-server-rpm'
      - name: Maven Tests
        run: |
          mvn test -B -Dair.check.skip-all -pl '
            !presto-main,
            !presto-tests,
            !presto-raptor-legacy,
            !presto-accumulo,
            !presto-cassandra,
            !presto-hive,!presto-orc,!presto-parquet,
            !presto-mongodb,!presto-kafka,!presto-elasticsearch,
            !presto-redis,
            !presto-sqlserver,!presto-postgresql,!presto-mysql,
            !presto-phoenix,!presto-iceberg,
            !presto-kudu,
            !presto-docs,!presto-server,!presto-server-rpm'

  test-modules:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        modules: [
          "presto-main",
          "presto-tests",
          "presto-raptor-legacy",
          "presto-accumulo",
          "presto-cassandra",
          "presto-hive,presto-orc,presto-parquet",
          "presto-mongodb,presto-kafka,presto-elasticsearch",
          "presto-redis",
          "presto-sqlserver,presto-postgresql,presto-mysql",
          "presto-phoenix,presto-iceberg",
        ]
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Maven Install
        run: |
          MAVEN_OPTS=$MAVEN_INSTALL_OPTS
          mvn install $MAVEN_FAST_INSTALL -pl '${{ matrix.modules }}' -am
      - name: Maven Tests
        run: mvn test -B -Dair.check.skip-all -pl '${{ matrix.modules }}'

  product-tests:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        config: [
          config-empty,
          config-hdp3,
        ]
        suite: [
          suite-1,
          suite-2,
          suite-3,
          # suite-4 does not exist
          suite-5,
          suite-6-non-generic,
          suite-7-non-generic,<commit_msg>Enable Maven stacktrace for workflow errors<commit_after>name: CI

on: [push, pull_request]

env:
  MAVEN_OPTS: -Xmx512M -XX:+ExitOnOutOfMemoryError
  MAVEN_INSTALL_OPTS: -Xmx2G -XX:+ExitOnOutOfMemoryError
  MAVEN_FAST_INSTALL: -B -e -V -T C1 -DskipTests -Dair.check.skip-all

jobs:
  maven-checks:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Install Maven Wrapper
        run: ./mvnw -v
      - name: Maven Checks
        run: |
          MAVEN_OPTS=$MAVEN_INSTALL_OPTS
          mvn install -B -e -V -T C1 -DskipTests -P ci -pl '!presto-server-rpm'
      - name: Test Server RPM
        run: |
          MAVEN_OPTS=$MAVEN_INSTALL_OPTS
          mvn install -B -e -P ci -pl presto-server-rpm
      - name: Test Docker Image
        run: docker/build-local.sh

  web-ui-checks:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Web UI Checks
        run: presto-main/bin/check_webui.sh

  hive-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Install Hive Module
        run: |
          MAVEN_OPTS=$MAVEN_INSTALL_OPTS
          mvn install $MAVEN_FAST_INSTALL -pl presto-hive-hadoop2 -am
      - name: Run Hive Tests
        run: |
          source presto-product-tests/conf/product-tests-config-empty.sh &&
            presto-hive-hadoop2/bin/run_hive_tests.sh

  kudu-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Install Kudu Module
        run: |
          MAVEN_OPTS=$MAVEN_INSTALL_OPTS
          mvn install $MAVEN_FAST_INSTALL -pl presto-kudu -am
      - name: Run Kudu Tests -- disable InferSchema
        run: presto-kudu/bin/run_kudu_tests.sh "null"
      - name: Run Kudu Tests -- enable InferSchema, empty prefix
        run: presto-kudu/bin/run_kudu_tests.sh ""
      - name: Run Kudu Tests -- enable InferSchema, standard prefix
        run: presto-kudu/bin/run_kudu_tests.sh "presto::"

  presto-tests-ci-only:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Maven Install
        run: |
          MAVEN_OPTS=$MAVEN_INSTALL_OPTS
          mvn install $MAVEN_FAST_INSTALL -pl presto-tests -am
      - name: Maven Tests
        run: mvn test -B -e -Dair.check.skip-all -pl presto-tests -P ci-only

  test-other-modules:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Maven Install
        run: |
          MAVEN_OPTS=$MAVEN_INSTALL_OPTS
          mvn install $MAVEN_FAST_INSTALL -pl '!presto-docs,!presto-server,!presto-server-rpm'
      - name: Maven Tests
        run: |
          mvn test -B -e -Dair.check.skip-all -pl '
            !presto-main,
            !presto-tests,
            !presto-raptor-legacy,
            !presto-accumulo,
            !presto-cassandra,
            !presto-hive,!presto-orc,!presto-parquet,
            !presto-mongodb,!presto-kafka,!presto-elasticsearch,
            !presto-redis,
            !presto-sqlserver,!presto-postgresql,!presto-mysql,
            !presto-phoenix,!presto-iceberg,
            !presto-kudu,
            !presto-docs,!presto-server,!presto-server-rpm'

  test-modules:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        modules: [
          "presto-main",
          "presto-tests",
          "presto-raptor-legacy",
          "presto-accumulo",
          "presto-cassandra",
          "presto-hive,presto-orc,presto-parquet",
          "presto-mongodb,presto-kafka,presto-elasticsearch",
          "presto-redis",
          "presto-sqlserver,presto-postgresql,presto-mysql",
          "presto-phoenix,presto-iceberg",
        ]
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Maven Install
        run: |
          MAVEN_OPTS=$MAVEN_INSTALL_OPTS
          mvn install $MAVEN_FAST_INSTALL -pl '${{ matrix.modules }}' -am
      - name: Maven Tests
        run: mvn test -B -e -Dair.check.skip-all -pl '${{ matrix.modules }}'

  product-tests:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        config: [
          config-empty,
          config-hdp3,
        ]
        suite: [
          suite-1,
          suite-2,
          suite-3,
          # suite-4 does not exist
          suite-5,
          suite-6-non-generic,
          suite-7-non-generic,
{'fraction_non_alphanumeric': 0.11038412832418742, 'fraction_numerical': 0.007387083157450401, 'mean_word_length': 1.7922804949911608, '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': '5970906', 'n_tokens_mistral': 3483, 'n_tokens_neox': 3411, 'n_words': 628}