-
Notifications
You must be signed in to change notification settings - Fork 5.5k
127 lines (122 loc) · 4.53 KB
/
hive-tests.yml
File metadata and controls
127 lines (122 loc) · 4.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: hive tests
on: pull_request
env:
# An envar that signals to tests we are executing in the CI environment
CONTINUOUS_INTEGRATION: true
MAVEN_OPTS: -Xmx1024M -XX:+ExitOnOutOfMemoryError
MAVEN_INSTALL_OPTS: -Xmx2G -XX:+ExitOnOutOfMemoryError
MAVEN_FAST_INSTALL: -B -V --quiet -T 1C -DskipTests -Dair.check.skip-all --no-transfer-progress -Dmaven.javadoc.skip=true
MAVEN_TEST: -B -Dair.check.skip-all -Dmaven.javadoc.skip=true -DLogTestDurationListener.enabled=true --no-transfer-progress --fail-at-end
RETRY: .github/bin/retry
jobs:
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
codechange: ${{ steps.filter.outputs.codechange }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
codechange:
- '!presto-docs/**'
hive-tests:
permissions:
contents: read
strategy:
fail-fast: false
matrix:
java: ['17']
runs-on: ubuntu-latest
needs: changes
timeout-minutes: 60
concurrency:
group: ${{ github.workflow }}-hive-tests-${{ github.event.pull_request.number }}-${{ matrix.java }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
if: needs.changes.outputs.codechange == 'true'
with:
show-progress: false
persist-credentials: false
- uses: actions/setup-java@v4
if: needs.changes.outputs.codechange == 'true'
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: maven
- name: Download nodejs to maven cache
if: needs.changes.outputs.codechange == 'true'
run: .github/bin/download_nodejs
- name: Install Hive Module
if: needs.changes.outputs.codechange == 'true'
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
./mvnw install ${MAVEN_FAST_INSTALL} -am -pl :presto-hive-hadoop2
- name: Run Hive Tests
if: needs.changes.outputs.codechange == 'true'
run: presto-hive-hadoop2/bin/run_hive_tests.sh
- name: Run Hive S3 Tests
if: needs.changes.outputs.codechange == 'true'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.HIVE_AWS_ACCESSKEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.HIVE_AWS_SECRETKEY }}
S3_BUCKET: presto-ci-test
S3_BUCKET_ENDPOINT: s3.us-east-2.amazonaws.com
run: |
if [ "${AWS_ACCESS_KEY_ID}" != "" ]; then
presto-hive-hadoop2/bin/run_hive_s3_tests.sh
fi
- name: Run Hive Glue Tests
if: needs.changes.outputs.codechange == 'true'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.HIVE_AWS_ACCESSKEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.HIVE_AWS_SECRETKEY }}
run: |
if [ "${HIVE_AWS_ACCESS_KEY_ID}" != "" ]; then
./mvnw test ${MAVEN_TEST} -pl :presto-hive -P test-hive-glue
fi
hive-dockerized-tests:
permissions:
contents: read
strategy:
fail-fast: false
matrix:
java: ['17']
runs-on: ubuntu-latest
needs: changes
timeout-minutes: 20
concurrency:
group: ${{ github.workflow }}-hive-dockerized-tests-${{ github.event.pull_request.number }}-${{ matrix.java }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
if: needs.changes.outputs.codechange == 'true'
with:
show-progress: false
persist-credentials: false
- uses: actions/setup-java@v4
if: needs.changes.outputs.codechange == 'true'
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: maven
- name: Download nodejs to maven cache
if: needs.changes.outputs.codechange == 'true'
run: .github/bin/download_nodejs
- name: Install Hive Module
if: needs.changes.outputs.codechange == 'true'
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
./mvnw install ${MAVEN_FAST_INSTALL} -am -pl :presto-hive
- name: Run Hive Insert Overwrite Tests
if: needs.changes.outputs.codechange == 'true'
run: ./mvnw test ${MAVEN_TEST} -pl :presto-hive -P test-hive-insert-overwrite
- name: Run Hive SSL Enabled Tests
if: needs.changes.outputs.codechange == 'true'
run: ./mvnw test ${MAVEN_TEST} -pl :presto-hive -P test-ssl-enabled-hms