-
Notifications
You must be signed in to change notification settings - Fork 564
378 lines (373 loc) · 11 KB
/
validate.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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
#
# Copyright (c) 2023, 2024 Oracle and/or its affiliates.
#
# Licensed 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: "Validate"
on:
pull_request:
push:
branches-ignore: [ 'main', 'helidon-*.x', 'release-*' ]
tags-ignore: [ '**' ]
workflow_call:
inputs:
ref:
description: The branch, tag or SHA to checkout
required: false
type: string
default: ''
env:
JAVA_VERSION: 21
JAVA_DISTRO: oracle
MAVEN_ARGS: |
-B -fae -e
-Dmaven.wagon.httpconnectionManager.ttlSeconds=60
-Dmaven.wagon.http.retryHandler.count=3
-Djdk.toolchain.version=${JAVA_VERSION}
-Dcache.enabled=true
concurrency:
group: validate-${{ github.ref }}
cancel-in-progress: true
jobs:
copyright:
timeout-minutes: 5
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
fetch-depth: 0
- uses: ./.github/actions/common
with:
run: etc/scripts/copyright.sh
checkstyle:
timeout-minutes: 5
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/common
with:
run: etc/scripts/checkstyle.sh
shellcheck:
timeout-minutes: 5
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/common
with:
maven-cache: none
run: etc/scripts/shellcheck.sh
build:
timeout-minutes: 15
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/common
with:
build-cache: read-write
maven-cache: read-write
run: |
mvn ${MAVEN_ARGS} build-cache:go-offline
mvn ${MAVEN_ARGS} -T8 \
-Dorg.slf4j.simpleLogger.showThreadName=true \
-DskipTests \
-Ptests \
install
_tests:
needs: build
timeout-minutes: 30
strategy:
matrix:
os: [ ubuntu-20.04 ]
moduleSet: [ core, it, dbclient, dbclient-oracle, others ]
include:
- { os: ubuntu-20.04, platform: linux }
runs-on: ${{ matrix.os }}
name: tests/${{ matrix.moduleSet }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/common
with:
build-cache: read-only
test-artifact-name: tests-${{ matrix.moduleSet }}
run: |
mvn ${MAVEN_ARGS} \
-DreactorRule=tests \
-DmoduleSet=${{ matrix.moduleSet }} \
-Dsurefire.reportNameSuffix=${{ matrix.platform }} \
verify
_tck:
needs: build
timeout-minutes: 30
strategy:
matrix:
moduleSet: [ cdi, rest, others ]
runs-on: ubuntu-20.04
name: tests/tck-${{ matrix.moduleSet }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/common
with:
build-cache: read-only
test-artifact-name: tests-tck-${{ matrix.moduleSet }}
run: |
mvn ${MAVEN_ARGS} \
-DreactorRule=tck \
-DmoduleSet=${{ matrix.moduleSet }} \
verify
_spotbugs:
needs: build
timeout-minutes: 30
strategy:
matrix:
moduleSet: [ core, integrations, others ]
runs-on: ubuntu-20.04
name: spotbugs/${{ matrix.moduleSet }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/common
with:
build-cache: read-only
run: |
mvn ${MAVEN_ARGS} -T8 \
-Dorg.slf4j.simpleLogger.showThreadName=true \
-DreactorRule=default \
-DmoduleSet=${{ matrix.moduleSet }} \
-DskipTests \
-Pspotbugs \
verify
javadoc:
needs: build
timeout-minutes: 30
strategy:
matrix:
moduleSet: [ core, integrations, others ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/common
with:
build-cache: read-only
artifact-name: javadoc-jars-${{ matrix.moduleSet }}
artifact-path: |
**/target/state-javadoc.xml
**/target/*-javadoc.jar
run: |
mvn ${MAVEN_ARGS} -T8 \
-Dorg.slf4j.simpleLogger.showThreadName=true \
-DreactorRule=default \
-DmoduleSet=${{ matrix.moduleSet }} \
-Dcache.recordSuffix=javadoc \
-DskipTests \
-Pjavadoc \
package
docs:
needs: build
timeout-minutes: 15
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/common
with:
build-cache: read-only
artifact-name: docs
artifact-path: |
*/target/state-docs.xml
*/target/*-docs.jar
run: |
mvn ${MAVEN_ARGS} \
-Dcache.recordSuffix=docs \
-f docs/pom.xml \
-Pjavadoc \
install
quickstarts:
needs: build
timeout-minutes: 30
strategy:
matrix:
os: [ ubuntu-20.04, macos-14 ]
include:
- { os: ubuntu-20.04, platform: linux }
- { os: macos-14, platform: macos }
runs-on: ${{ matrix.os }}
name: quickstarts/${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/common
with:
free-space: true
build-cache: read-only
native-image: true
test-artifact-name: tests-quickstarts-${{ matrix.platform }}
run: |
etc/scripts/test-quickstarts.sh
examples:
needs: build
timeout-minutes: 30
strategy:
matrix:
os: [ ubuntu-20.04, macos-14 ]
include:
- { os: ubuntu-20.04, platform: linux }
- { os: macos-14, platform: macos }
runs-on: ${{ matrix.os }}
name: examples/${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/common
with:
free-space: true
build-cache: read-only
test-artifact-name: tests-examples-${{ matrix.platform }}
run: etc/scripts/build-examples.sh
archetypes:
needs: build
timeout-minutes: 30
strategy:
matrix:
group: [ r1, r2, r3, r4, r5 ]
packaging: [ jar ]
include:
- { group: r1, start: 1, end: 25 }
- { group: r2, start: 26, end: 50 }
- { group: r3, start: 51, end: 75 }
- { group: r4, start: 75, end: 100 }
- { group: r5, start: 101, end: -1 }
- { packaging: jar }
runs-on: ubuntu-20.04
name: archetypes/${{ matrix.group }}-${{ matrix.packaging }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/common
with:
build-cache: read-only
native-image: ${{ matrix.packaging == 'native' }}
test-artifact-name: tests-archetypes-${{ matrix.group }}-${{ matrix.packaging }}
run: |
mvn ${MAVEN_ARGS} \
-f archetypes/archetypes/pom.xml \
-Darchetype.test.permutationStartIndex=${{ matrix.start }} \
-Darchetype.test.permutationEndIndex=${{ matrix.end }} \
-Darchetype.test.testGoal=verify \
-Darchetype.test.testProfiles=${{ matrix.profile }} \
verify
legacy-archetypes:
needs: build
timeout-minutes: 30
runs-on: ubuntu-20.04
name: archetypes/legacy
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/common
with:
build-cache: read-only
test-artifact-name: tests-legacy-archetypes
run: |
mvn ${MAVEN_ARGS} \
-f archetypes/pom.xml \
-Darchetype.test.generatePermutations=false \
install
packaging:
needs: build
timeout-minutes: 30
strategy:
matrix:
os: [ ubuntu-20.04, macos-14 ]
packaging: [ jar, jlink ]
include:
- { os: ubuntu-20.04, platform: linux }
- { os: macos-14, platform: macos }
runs-on: ${{ matrix.os }}
name: tests/packaging-${{ matrix.packaging }}-${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/common
with:
free-space: true
build-cache: read-only
test-artifact-name: tests-packaging-${{ matrix.packaging }}-${{ matrix.platform }}
run: |
mvn ${MAVEN_ARGS} \
-f tests/integration/packaging/pom.xml \
-P${{ matrix.packaging }}-image \
verify
_native-image:
needs: build
timeout-minutes: 30
strategy:
matrix:
os: [ ubuntu-20.04, macos-14 ]
module: [ mp-1, mp-2, mp-3, se-1, inject ]
include:
- { os: ubuntu-20.04, platform: linux }
- { os: macos-14, platform: macos }
runs-on: ${{ matrix.os }}
name: tests/native-image-${{ matrix.module }}-${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/common
with:
free-space: true
build-cache: read-only
native-image: true
test-artifact-name: tests-native-image-${{ matrix.module }}-${{ matrix.platform }}
run: |
mvn ${MAVEN_ARGS} \
-f tests/integration/packaging/pom.xml \
-pl ${{ matrix.module }} \
-Pnative-image \
-am \
verify
test-results:
runs-on: ubuntu-20.04
needs: [ _tests, archetypes, legacy-archetypes, _tck, packaging, _native-image ]
name: tests/results
steps:
- uses: actions/upload-artifact/merge@v4
with:
name: test-results
pattern: "tests-*"
gate:
runs-on: ubuntu-20.04
needs: [ copyright, checkstyle, shellcheck, docs, javadoc, _spotbugs, test-results ]
steps:
- shell: bash
run: |
echo OK