Skip to content

Commit 2bfac9c

Browse files
committed
Add github workflow for nightly quarkus testing
1 parent 5c19690 commit 2bfac9c

File tree

1 file changed

+382
-0
lines changed

1 file changed

+382
-0
lines changed

.github/workflows/quarkus.yml

Lines changed: 382 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,382 @@
1+
name: Nightly quarkus tests
2+
3+
on:
4+
push:
5+
paths:
6+
- '.github/workflows/quarkus.yml'
7+
pull_request:
8+
paths:
9+
- '.github/workflows/quarkus.yml'
10+
schedule:
11+
- cron: '0 3 * * *'
12+
13+
env:
14+
# Workaround testsuite locale issue
15+
LANG: en_US.UTF-8
16+
DB_USER: hibernate_orm_test
17+
DB_PASSWORD: hibernate_orm_test
18+
DB_NAME: hibernate_orm_test
19+
NATIVE_TEST_MAVEN_OPTS: "-B --settings ${GITHUB_WORKSPACE}/quarkus/.github/mvn-settings.xml --fail-at-end -Dquarkus.native.container-build=true -Dtest-postgresql -Dtest-elasticsearch -Dtest-keycloak -Dtest-amazon-services -Dtest-db2 -Dtest-mysql -Dtest-mariadb -Dmariadb.base_url='jdbc:mariadb://localhost:3308' -Dmariadb.url='jdbc:mariadb://localhost:3308/hibernate_orm_test' -Dtest-mssql -Dtest-vault -Dtest-neo4j -Dtest-kafka -Dtest-redis -Dnative-image.xmx=5g -Dnative -Dnative.surefire.skip -Dformat.skip -Dno-descriptor-tests install"
20+
MX_GIT_CACHE: refcache
21+
22+
jobs:
23+
build-quarkus-and-graalvm:
24+
name: Nightly quarkus and GraalVM build
25+
runs-on: ubuntu-18.04
26+
steps:
27+
- uses: actions/checkout@v1
28+
with:
29+
fetch-depth: 1
30+
path: graal
31+
- uses: actions/checkout@v1
32+
with:
33+
repository: graalvm/mx.git
34+
ref: master
35+
path: mx
36+
- name: Get latest quarkus release
37+
run: |
38+
curl --output quarkus.tgz -sL $(curl -sL https://api.github.com/repos/quarkusio/quarkus/releases/latest | jq -r .tarball_url)
39+
mkdir ${GITHUB_WORKSPACE}/quarkus
40+
tar xf quarkus.tgz -C ${GITHUB_WORKSPACE}/quarkus --strip-components=1
41+
- uses: actions/cache@v1
42+
with:
43+
path: ~/.m2/repository
44+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
45+
restore-keys: |
46+
${{ runner.os }}-maven-
47+
- uses: actions/cache@v1
48+
with:
49+
path: ~/.mx
50+
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
51+
restore-keys: |
52+
${{ runner.os }}-mx-
53+
- name: Get labsJDK11 version
54+
run: |
55+
export LABSJDK_VERSION=$(jq -r '.jdks."labsjdk-ce-11".version' common.json)
56+
echo "::set-env name=JDK_VERSION::$(echo $LABSJDK_VERSION | cut -d- -f 2 | cut -d+ -f 1)"
57+
echo "::set-env name=JDK_VERSION_SUFFIX::+$(echo $LABSJDK_VERSION | cut -d- -f 2 | cut -d+ -f 2)"
58+
echo "::set-env name=JVMCI_VERSION::$(echo $LABSJDK_VERSION | cut -d- -f 3,4,5)"
59+
- name: Get labsJDK11
60+
run: |
61+
export JDK_VERSION=${{ env.JDK_VERSION }}
62+
export JDK_VERSION_SUFFIX=${{ env.JDK_VERSION_SUFFIX }}
63+
export JVMCI_VERSION=${{ env.JVMCI_VERSION }}
64+
wget --no-verbose "https://github.com/graalvm/labs-openjdk-11/releases/download/${JVMCI_VERSION}/labsjdk-ce-${JDK_VERSION}${JDK_VERSION_SUFFIX}-${JVMCI_VERSION}-linux-amd64.tar.gz"
65+
tar xf labsjdk-ce-${JDK_VERSION}${JDK_VERSION_SUFFIX}-${JVMCI_VERSION}-linux-amd64.tar.gz
66+
labsjdk-ce-${JDK_VERSION}-${JVMCI_VERSION}/bin/java --version
67+
- name: Build graalvm native-image
68+
run: |
69+
export JAVA_HOME=${GITHUB_WORKSPACE}/labsjdk-ce-${{ env.JDK_VERSION }}-${{ env.JVMCI_VERSION }}
70+
cd substratevm
71+
../../mx/mx --components="Native Image" build
72+
mv $(../../mx/mx --components="Native Image" graalvm-home) ~/graaljdk
73+
~/graaljdk/bin/native-image --version
74+
- name: Tar GraalVM
75+
shell: bash
76+
run: tar -czvf graaljdk.tgz -C ~ graaljdk
77+
- name: Persist GraalVM build
78+
uses: actions/upload-artifact@v1
79+
with:
80+
name: graaljdk
81+
path: graaljdk.tgz
82+
- name: Build quarkus
83+
run: |
84+
export JAVA_HOME=${GITHUB_WORKSPACE}/labsjdk-ce-${{ env.JDK_VERSION }}-${{ env.JVMCI_VERSION }}
85+
cd ${GITHUB_WORKSPACE}/quarkus
86+
eval ./mvnw -e -B -DskipTests -DskipDocs clean install
87+
- name: Tar Maven Repo
88+
shell: bash
89+
run: tar -czvf maven-repo.tgz -C ~ .m2/repository
90+
- name: Persist Maven Repo
91+
uses: actions/upload-artifact@v1
92+
with:
93+
name: maven-repo
94+
path: maven-repo.tgz
95+
96+
native-tests:
97+
name: Native Tests - ${{matrix.category}}
98+
needs: build-quarkus-and-graalvm
99+
runs-on: ubuntu-latest
100+
# Ignore the following YAML Schema error
101+
timeout-minutes: ${{matrix.timeout}}
102+
strategy:
103+
max-parallel: 8
104+
fail-fast: false
105+
matrix:
106+
category: [Main, Data1, Data2, Data3, Data4, Data5, Data6, Security1, Security2, Security3, Amazon, Messaging, Cache, HTTP, Misc1, Misc2, Misc3, Misc4, Spring, gRPC]
107+
include:
108+
- category: Main
109+
postgres: "true"
110+
timeout: 40
111+
test-modules: main
112+
- category: Data1
113+
mariadb: "true"
114+
mssql: "true"
115+
timeout: 65
116+
test-modules: >
117+
jpa-h2
118+
jpa-mariadb
119+
jpa-mssql
120+
jpa-derby
121+
jpa-without-entity
122+
hibernate-tenancy
123+
- category: Data2
124+
db2: "true"
125+
mysql: "true"
126+
mariadb: "true"
127+
timeout: 65
128+
test-modules: >
129+
jpa
130+
jpa-mysql
131+
jpa-db2
132+
reactive-mysql-client
133+
reactive-db2-client
134+
hibernate-reactive-db2
135+
hibernate-reactive-mysql
136+
- category: Data3
137+
postgres: "true"
138+
timeout: 70
139+
test-modules: >
140+
flyway
141+
hibernate-orm-panache
142+
hibernate-orm-panache-kotlin
143+
hibernate-orm-envers
144+
liquibase
145+
- category: Data4
146+
neo4j: "true"
147+
redis: "true"
148+
timeout: 55
149+
test-modules: >
150+
mongodb-client
151+
mongodb-panache
152+
redis-client
153+
neo4j
154+
hibernate-orm-rest-data-panache
155+
- category: Data5
156+
postgres: "true"
157+
timeout: 65
158+
test-modules: >
159+
jpa-postgresql
160+
narayana-stm
161+
narayana-jta
162+
reactive-pg-client
163+
hibernate-reactive-postgresql
164+
- category: Data6
165+
postgres: "true"
166+
timeout: 40
167+
test-modules: >
168+
elasticsearch-rest-client
169+
elasticsearch-rest-high-level-client
170+
hibernate-search-elasticsearch
171+
- category: Amazon
172+
amazonServices: "true"
173+
timeout: 45
174+
test-modules: >
175+
amazon-services
176+
amazon-lambda
177+
amazon-lambda-http
178+
- category: Messaging
179+
timeout: 75
180+
test-modules: >
181+
artemis-core
182+
artemis-jms
183+
kafka
184+
kafka-streams
185+
reactive-messaging-amqp
186+
- category: Security1
187+
timeout: 50
188+
keycloak: "true"
189+
test-modules: >
190+
elytron-security-oauth2
191+
elytron-security
192+
elytron-security-jdbc
193+
elytron-undertow
194+
elytron-security-ldap
195+
- category: Security2
196+
timeout: 70
197+
keycloak: "true"
198+
test-modules: >
199+
elytron-resteasy
200+
oidc
201+
oidc-code-flow
202+
oidc-tenancy
203+
keycloak-authorization
204+
- category: Security3
205+
timeout: 50
206+
test-modules: >
207+
vault
208+
vault-app
209+
vault-agroal
210+
- category: Cache
211+
timeout: 55
212+
test-modules: >
213+
infinispan-cache-jpa
214+
infinispan-client
215+
cache
216+
- category: HTTP
217+
timeout: 60
218+
test-modules: >
219+
resteasy-jackson
220+
resteasy-mutiny
221+
vertx
222+
vertx-http
223+
vertx-web
224+
vertx-graphql
225+
virtual-http
226+
rest-client
227+
- category: Misc1
228+
timeout: 60
229+
test-modules: >
230+
maven
231+
jackson
232+
jsonb
233+
jsch
234+
jgit
235+
quartz
236+
qute
237+
consul-config
238+
- category: Misc2
239+
timeout: 55
240+
test-modules: >
241+
tika
242+
hibernate-validator
243+
test-extension
244+
logging-gelf
245+
bootstrap-config
246+
# kubernetes-client alone takes 30mn+
247+
- category: Misc3
248+
timeout: 60
249+
test-modules: >
250+
kubernetes-client
251+
- category: Misc4
252+
timeout: 30
253+
test-modules: >
254+
smallrye-graphql
255+
picocli-native
256+
gradle
257+
- category: Spring
258+
timeout: 50
259+
test-modules: >
260+
spring-di
261+
spring-web
262+
spring-data-jpa
263+
spring-boot-properties
264+
spring-cloud-config-client
265+
- category: gRPC
266+
timeout: 65
267+
test-modules: >
268+
grpc-health
269+
grpc-interceptors
270+
grpc-mutual-auth
271+
grpc-plain-text
272+
grpc-proto-v2
273+
grpc-streaming
274+
grpc-tls
275+
steps:
276+
# These should be services, but services do not (yet) allow conditional execution
277+
- name: Postgres Service
278+
run: |
279+
docker run --rm --publish 5432:5432 --name build-postgres \
280+
-e POSTGRES_USER=$DB_USER -e POSTGRES_PASSWORD=$DB_PASSWORD -e POSTGRES_DB=$DB_NAME \
281+
-d postgres:10.5
282+
if: matrix.postgres
283+
- name: MySQL Service
284+
run: |
285+
sudo service mysql stop || true
286+
docker run --rm --publish 3306:3306 --name build-mysql \
287+
-e MYSQL_USER=$DB_USER -e MYSQL_PASSWORD=$DB_PASSWORD -e MYSQL_DATABASE=$DB_NAME -e MYSQL_RANDOM_ROOT_PASSWORD=true \
288+
-d mysql:5 --skip-ssl
289+
if: matrix.mysql
290+
- name: DB2 Service
291+
run: |
292+
docker run --rm --publish 50000:50000 --name build-db2 --privileged=true \
293+
-e DB2INSTANCE=hreact -e DB2INST1_PASSWORD=hreact -e DBNAME=hreact -e LICENSE=accept -e AUTOCONFIG=false -e ARCHIVE_LOGS=false \
294+
-d ibmcom/db2:11.5.0.0a
295+
if: matrix.db2
296+
- name: Maria DB Service
297+
run: |
298+
docker run --rm --publish 3308:3306 --name build-mariadb \
299+
-e MYSQL_USER=$DB_USER -e MYSQL_PASSWORD=$DB_PASSWORD -e MYSQL_DATABASE=$DB_NAME -e MYSQL_ROOT_PASSWORD=secret \
300+
-d mariadb:10.4
301+
if: matrix.mariadb
302+
- name: MS-SQL Service
303+
run: |
304+
docker run --rm --publish 1433:1433 --name build-mssql \
305+
-e ACCEPT_EULA=Y -e SA_PASSWORD=ActuallyRequired11Complexity \
306+
-d microsoft/mssql-server-linux:2017-CU13
307+
if: matrix.mssql
308+
- name: Amazon Services
309+
run: |
310+
docker run --rm --publish 8000:4569 --publish 8008:4572 --publish 8009:4575 --publish 8010:4576 --publish 8011:4599 --publish 8012:4566 --name build-amazon-service-clients -e SERVICES=s3,dynamodb,sns,sqs,kms,ses -e START_WEB=0 \
311+
-d localstack/localstack:0.11.1
312+
if: matrix.amazonServices
313+
- name: Neo4j Service
314+
run: |
315+
docker run --rm --publish 7687:7687 --name build-neo4j \
316+
-e NEO4J_AUTH=neo4j/secret -e NEO4J_dbms_memory_pagecache_size=10M -e NEO4J_dbms_memory_heap_initial__size=10M \
317+
-d neo4j/neo4j-experimental:4.0.0-rc01
318+
if: matrix.neo4j
319+
- name: Redis Service
320+
run: docker run --rm --publish 6379:6379 --name build-redis -d redis:5.0.8-alpine
321+
if: matrix.redis
322+
- name: Keycloak Service
323+
run: |
324+
docker run --rm --publish 8180:8080 --publish 8543:8443 --name build-keycloak \
325+
-e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -e JAVA_OPTS=" \
326+
-server -Xms64m -Xmx512m -XX:MetaspaceSize=96M \
327+
-XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true \
328+
-Dkeycloak.profile.feature.upload_scripts=enabled" \
329+
-d quay.io/keycloak/keycloak:11.0.0
330+
if: matrix.keycloak
331+
- name: Download GraalVM build
332+
uses: actions/download-artifact@v1
333+
with:
334+
name: graaljdk
335+
path: .
336+
- name: Extract GraalVM build
337+
shell: bash
338+
run: tar -xzvf graaljdk.tgz -C ${GITHUB_WORKSPACE}
339+
- name: Get latest quarkus release
340+
run: |
341+
curl --output quarkus.tgz -sL $(curl -sL https://api.github.com/repos/quarkusio/quarkus/releases/latest | jq -r .tarball_url)
342+
mkdir ${GITHUB_WORKSPACE}/quarkus
343+
tar xf quarkus.tgz -C ${GITHUB_WORKSPACE}/quarkus --strip-components=1
344+
- name: Reclaim Disk Space
345+
run: ${GITHUB_WORKSPACE}/quarkus/.github/ci-prerequisites.sh
346+
- name: Download Maven Repo
347+
uses: actions/download-artifact@v1
348+
with:
349+
name: maven-repo
350+
path: .
351+
- name: Extract Maven Repo
352+
shell: bash
353+
run: tar -xzf maven-repo.tgz -C ~
354+
- name: Build with Maven
355+
env:
356+
TEST_MODULES: ${{matrix.test-modules}}
357+
CATEGORY: ${{matrix.category}}
358+
run: |
359+
cd ${GITHUB_WORKSPACE}/quarkus
360+
export JAVA_HOME=${GITHUB_WORKSPACE}/graaljdk
361+
export GRAALVM_HOME=${GITHUB_WORKSPACE}/graaljdk
362+
${GRAALVM_HOME}/bin/native-image --version
363+
for i in $TEST_MODULES
364+
do modules+=("integration-tests/$i"); done
365+
IFS=,
366+
eval mvn -pl "${modules[*]}" $NATIVE_TEST_MAVEN_OPTS
367+
# add the 'simple with spaces' project to the run of 'Misc1' by executing it explicitly
368+
# done because there is no good way to pass strings with empty values to the previous command
369+
# so this hack is as good as any
370+
if [ "$CATEGORY" == "Misc1" ]; then
371+
mvn -Dnative -Dquarkus.native.container-build=true -B --settings ${GITHUB_WORKSPACE}/quarkus/.github/mvn-settings.xml -f 'integration-tests/simple with space/' verify
372+
fi
373+
- name: Prepare failure archive (if maven failed)
374+
if: failure()
375+
shell: bash
376+
run: find . -type d -name '*-reports' -o -wholename '*/build/reports/tests/functionalTest' | tar -czf test-reports.tgz -T -
377+
- name: Upload failure Archive (if maven failed)
378+
uses: actions/upload-artifact@v1
379+
if: failure()
380+
with:
381+
name: test-reports-native-${{matrix.category}}
382+
path: 'test-reports.tgz'

0 commit comments

Comments
 (0)