[Snyk] Fix for 15 vulnerabilities #352
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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. | |
# | |
name: Pinot Tests | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- "contrib/**" | |
- "docs/**" | |
- "docker/**" | |
- "kubernetes/**" | |
- "licenses/**" | |
- "licenses-binary/**" | |
- "**.md" | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- "contrib/**" | |
- "docs/**" | |
- "docker/**" | |
- "kubernetes/**" | |
- "licenses/**" | |
- "licenses-binary/**" | |
- "**.md" | |
jobs: | |
linter-test: | |
if: github.repository == 'apache/pinot' | |
runs-on: ubuntu-latest | |
name: Pinot Linter Test Set | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: 'adopt' | |
cache: 'maven' | |
- name: Linter Test | |
env: | |
MAVEN_OPTS: > | |
-Xmx2G -DskipShade -DfailIfNoTests=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 | |
-Dmaven.wagon.http.retryHandler.count=3 -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false | |
-XX:+IgnoreUnrecognizedVMOptions | |
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED | |
run: .github/workflows/scripts/.pinot_linter.sh | |
unit-test: | |
if: github.repository == 'apache/pinot' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
testset: [ 1, 2 ] | |
name: Pinot Unit Test Set ${{ matrix.testset }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: 'adopt' | |
cache: 'maven' | |
# Step that does that actual cache save and restore | |
- uses: actions/cache@v3 | |
env: | |
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Unit Test | |
env: | |
RUN_INTEGRATION_TESTS: false | |
RUN_TEST_SET: ${{ matrix.testset }} | |
MAVEN_OPTS: > | |
-Xmx2G -DskipShade -DfailIfNoTests=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 | |
-Dmaven.wagon.http.retryHandler.count=3 -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false | |
-XX:+IgnoreUnrecognizedVMOptions | |
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED | |
run: .github/workflows/scripts/.pinot_test.sh | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
flags: unittests${{ matrix.testset }} | |
name: codecov-unit-tests | |
fail_ci_if_error: false | |
verbose: true | |
integration-test: | |
if: github.repository == 'apache/pinot' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
testset: [ 1, 2 ] | |
name: Pinot Integration Test Set ${{ matrix.testset }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: 'adopt' | |
cache: 'maven' | |
# Step that does that actual cache save and restore | |
- uses: actions/cache@v3 | |
env: | |
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Integration Test | |
env: | |
RUN_INTEGRATION_TESTS: true | |
RUN_TEST_SET: ${{ matrix.testset }} | |
MAVEN_OPTS: > | |
-Xmx2G -DskipShade -DfailIfNoTests=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 | |
-Dmaven.wagon.http.retryHandler.count=3 -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false | |
-XX:+IgnoreUnrecognizedVMOptions | |
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED | |
run: .github/workflows/scripts/.pinot_test.sh | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
flags: integration${{ matrix.testset }} | |
name: codecov-integration-tests | |
fail_ci_if_error: false | |
verbose: true | |
compatibility-verifier: | |
if: github.repository == 'apache/pinot' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
test_suite: [ "compatibility-verifier/sample-test-suite" ] | |
old_commit: [ "release-0.9.0", "master" ] | |
name: Pinot Compatibility Regression Testing against ${{ matrix.old_commit }} on ${{ matrix.test_suite }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 8 | |
distribution: 'adopt' | |
cache: 'maven' | |
# Step that does that actual cache save and restore | |
- uses: actions/cache@v3 | |
env: | |
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Pinot Compatibility Regression Testing | |
env: | |
OLD_COMMIT: ${{ matrix.old_commit }} | |
WORKING_DIR: /tmp/compatibility-verifier | |
TEST_SUITE: ${{ matrix.test_suite }} | |
MAVEN_OPTS: > | |
-Xmx2G -DskipShade -DfailIfNoTests=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 | |
-Dmaven.wagon.http.retryHandler.count=3 -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false | |
-XX:+IgnoreUnrecognizedVMOptions | |
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED | |
run: .github/workflows/scripts/.pinot_compatibility_verifier.sh | |
quickstarts: | |
if: github.repository == 'apache/pinot' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# We only test LTS Java versions | |
# TODO: add JDK 17 once ready. see: https://github.com/apache/pinot/issues/8529 | |
java: [ 8, 11, 15 ] | |
name: Pinot Quickstart on JDK ${{ matrix.java }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'adopt' | |
cache: 'maven' | |
# Step that does that actual cache save and restore | |
- uses: actions/cache@v3 | |
env: | |
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 10 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Quickstart on JDK ${{ matrix.java }} | |
run: .github/workflows/scripts/.pinot_quickstart.sh | |
presto-driver-build: | |
if: github.repository == 'apache/pinot' | |
runs-on: ubuntu-latest | |
name: Build Presto Pinot Driver | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: 'adopt' | |
cache: 'maven' | |
- name: Build presto pinot driver with JDK 11 | |
env: | |
MAVEN_OPTS: > | |
-Xmx2G -DfailIfNoTests=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 | |
-Dmaven.wagon.http.retryHandler.count=3 -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false | |
-XX:+IgnoreUnrecognizedVMOptions | |
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED | |
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED | |
run: | | |
mvn clean install -DskipTests -Ppresto-driver -am -B -pl ':presto-pinot-driver' -T 16 || exit 1 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 8 | |
distribution: 'adopt' | |
cache: 'maven' | |
- name: Build presto pinot driver with JDK 8 | |
env: | |
MAVEN_OPTS: -Xmx2G -DfailIfNoTests=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false | |
run: | | |
mvn clean install -DskipTests -Ppresto-driver -am -B -pl ':presto-pinot-driver' -Djdk.version=8 -T 16 || exit 1 |