-
Notifications
You must be signed in to change notification settings - Fork 86
264 lines (247 loc) · 9.53 KB
/
VeniceCI-CompatibilityTests.yml
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# GitHub Actions workflow for running compatibility tests: Avro, Alpini unit, Alpini functional tests, and Pulsar Venice integration tests
name: TestsDeCompatibilite
on: [push, pull_request, workflow_dispatch]
jobs:
AvroCompatibilityTests:
strategy:
fail-fast: false
matrix:
jdk: [17]
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
cache: 'gradle'
- shell: bash
run: |
git remote set-head origin --auto
git remote add upstream https://github.com/linkedin/venice
git fetch upstream
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: "-DmaxParallelForks=2 --parallel :internal:venice-avro-compatibility-test:test --continue"
- name: Package Build Artifacts
if: success() || failure()
shell: bash
run: |
mkdir ${{ github.job }}-artifacts
find . -path "**/build/reports/*" -or -path "**/build/test-results/*" > artifacts.list
rsync -R --files-from=artifacts.list . ${{ github.job }}-artifacts
tar -zcvf ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz ${{ github.job }}-artifacts
- name: Upload Build Artifacts
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: ${{ github.job }}
path: ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz
retention-days: 30
AlpiniUnitTests:
strategy:
fail-fast: false
matrix:
jdk: [8, 11, 17]
runs-on: ubuntu-latest
timeout-minutes: 120
outputs:
alpini_touched: ${{ steps.check_alpini_files_changed.outputs.alpini }}
steps:
- uses: actions/checkout@v3
with:
# Checkout as many commits as needed for the diff
fetch-depth: 2
- name: Check if files have changed
uses: dorny/paths-filter@v2
id: check_alpini_files_changed
with:
filters: |
alpini:
- 'internal/alpini/**'
- uses: actions/checkout@v3
if: steps.check_alpini_files_changed.outputs.alpini == 'true'
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
if: steps.check_alpini_files_changed.outputs.alpini == 'true'
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
cache: 'gradle'
# - name: Allow Deprecated TLS versions for Alpini tests
# run: |
# echo "java.security file before modifications: "
# cat "$JAVA_HOME/conf/security/java.security"
# # This is possibly flaky but
# sed -i 's/TLSv1, //g' "$JAVA_HOME/conf/security/java.security" # Allow TLSv1
# sed -i 's/TLSv1.1, //g' "$JAVA_HOME/conf/security/java.security" # Allow TLSv1.1
# echo "java.security file after modifications: "
# cat "$JAVA_HOME/conf/security/java.security"
- shell: bash
if: steps.check_alpini_files_changed.outputs.alpini == 'true'
run: |
git remote set-head origin --auto
git remote add upstream https://github.com/linkedin/venice
git fetch upstream
- name: Build with Gradle
if: steps.check_alpini_files_changed.outputs.alpini == 'true'
uses: gradle/gradle-build-action@v2
with:
arguments: "--continue --no-daemon -DmaxParallelForks=1 alpiniUnitTest"
- name: Package Build Artifacts
if: steps.check_alpini_files_changed.outputs.alpini == 'true' && (success() || failure())
shell: bash
run: |
mkdir ${{ github.job }}-artifacts
find . -path "**/build/reports/*" -or -path "**/build/test-results/*" > artifacts.list
rsync -R --files-from=artifacts.list . ${{ github.job }}-artifacts
tar -zcvf ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz ${{ github.job }}-artifacts
- name: Upload Build Artifacts
if: steps.check_alpini_files_changed.outputs.alpini == 'true' && (success() || failure())
uses: actions/upload-artifact@v3
with:
name: ${{ github.job }}
path: ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz
retention-days: 30
AlpiniFunctionalTests:
strategy:
fail-fast: false
matrix:
jdk: [17]
runs-on: ubuntu-latest
timeout-minutes: 120
outputs:
alpini_touched: ${{ steps.check_alpini_files_changed.outputs.alpini }}
steps:
- uses: actions/checkout@v3
with:
# Checkout as many commits as needed for the diff
fetch-depth: 2
- name: Check if files have changed
uses: dorny/paths-filter@v2
id: check_alpini_files_changed
with:
filters: |
alpini:
- 'internal/alpini/**'
- uses: actions/checkout@v3
if: steps.check_alpini_files_changed.outputs.alpini == 'true'
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
if: steps.check_alpini_files_changed.outputs.alpini == 'true'
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
cache: 'gradle'
# - name: Allow Deprecated TLS versions for Alpini tests
# run: |
# echo "java.security file before modifications: "
# cat "$JAVA_HOME/conf/security/java.security"
# # This is possibly flaky but
# sed -i 's/TLSv1, //g' "$JAVA_HOME/conf/security/java.security" # Allow TLSv1
# sed -i 's/TLSv1.1, //g' "$JAVA_HOME/conf/security/java.security" # Allow TLSv1.1
# echo "java.security file after modifications: "
# cat "$JAVA_HOME/conf/security/java.security"
- shell: bash
if: steps.check_alpini_files_changed.outputs.alpini == 'true'
run: |
git remote set-head origin --auto
git remote add upstream https://github.com/linkedin/venice
git fetch upstream
- name: Build with Gradle
if: steps.check_alpini_files_changed.outputs.alpini == 'true'
uses: gradle/gradle-build-action@v2
with:
arguments: "--continue --no-daemon -DmaxParallelForks=1 alpiniFunctionalTest"
- name: Package Build Artifacts
if: steps.check_alpini_files_changed.outputs.alpini == 'true' && (success() || failure())
shell: bash
run: |
mkdir ${{ github.job }}-artifacts
find . -path "**/build/reports/*" -or -path "**/build/test-results/*" > artifacts.list
rsync -R --files-from=artifacts.list . ${{ github.job }}-artifacts
tar -zcvf ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz ${{ github.job }}-artifacts
- name: Upload Build Artifacts
if: steps.check_alpini_files_changed.outputs.alpini == 'true' && (success() || failure())
uses: actions/upload-artifact@v3
with:
name: ${{ github.job }}
path: ${{ github.job }}-jdk${{ matrix.jdk }}-logs.tar.gz
retention-days: 30
PulsarVeniceIntegrationTests:
strategy:
fail-fast: false
matrix:
jdk: [17]
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
cache: 'gradle'
- shell: bash
run: |
git remote set-head origin --auto
git remote add upstream https://github.com/linkedin/venice
git fetch upstream
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build with gradle
run: ./gradlew assemble --continue --no-daemon -DforkEvery=1 -DmaxParallelForks=1
- name: Build docker images for Venice (latest-dev tag)
shell: bash
run: |
cd ${{ github.workspace }}/docker
./build-venice-docker-images.sh
cd ${{ github.workspace }}
- name: Build docker images for Pulsar test (latest-dev tag)
shell: bash
run: |
cd ${{ github.workspace }}/tests/docker-images/pulsar-sink
docker build --tag=pulsar/venice-test:latest-dev ${{ github.workspace }} -f ./Dockerfile
cd ${{ github.workspace }}
- name: Run the test
shell: bash
run: |
./gradlew :tests:venice-pulsar-test:pulsarIntegrationTest -i
- name: Package Build Artifacts
if: success() || failure()
shell: bash
run: |
mkdir ${{ github.job }}-artifacts
find . -path "**/build/reports/*" -or -path "**/build/test-results/*" > artifacts.list
rsync -R --files-from=artifacts.list . ${{ github.job }}-artifacts
tar -zcvf ${{ github.job }}-artifacts.tar.gz ${{ github.job }}-artifacts
- name: Upload Build Artifacts
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: ${{ github.job }}
path: ${{ github.job }}-artifacts.tar.gz
retention-days: 30
CompatibilityTestsCompletionCheck:
strategy:
fail-fast: false
runs-on: ubuntu-latest
needs: [AvroCompatibilityTests, AlpiniUnitTests, AlpiniFunctionalTests, PulsarVeniceIntegrationTests]
timeout-minutes: 120
steps:
- name: AllIsWell
shell: bash
run: |
echo "LGTM!"