forked from oracle/graal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github workflow for nightly quarkus testing
- Loading branch information
Showing
1 changed file
with
382 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,382 @@ | ||
name: Nightly quarkus tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/quarkus.yml' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/quarkus.yml' | ||
schedule: | ||
- cron: '0 3 * * *' | ||
|
||
env: | ||
# Workaround testsuite locale issue | ||
LANG: en_US.UTF-8 | ||
DB_USER: hibernate_orm_test | ||
DB_PASSWORD: hibernate_orm_test | ||
DB_NAME: hibernate_orm_test | ||
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" | ||
MX_GIT_CACHE: refcache | ||
|
||
jobs: | ||
build-quarkus-and-graalvm: | ||
name: Nightly quarkus and GraalVM build | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
path: graal | ||
- uses: actions/checkout@v1 | ||
with: | ||
repository: graalvm/mx.git | ||
ref: master | ||
path: mx | ||
- name: Get latest quarkus release | ||
run: | | ||
curl --output quarkus.tgz -sL $(curl -sL https://api.github.com/repos/quarkusio/quarkus/releases/latest | jq -r .tarball_url) | ||
mkdir ${GITHUB_WORKSPACE}/quarkus | ||
tar xf quarkus.tgz -C ${GITHUB_WORKSPACE}/quarkus --strip-components=1 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.mx | ||
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }} | ||
restore-keys: | | ||
${{ runner.os }}-mx- | ||
- name: Get labsJDK11 version | ||
run: | | ||
export LABSJDK_VERSION=$(jq -r '.jdks."labsjdk-ce-11".version' common.json) | ||
echo "::set-env name=JDK_VERSION::$(echo $LABSJDK_VERSION | cut -d- -f 2 | cut -d+ -f 1)" | ||
echo "::set-env name=JDK_VERSION_SUFFIX::+$(echo $LABSJDK_VERSION | cut -d- -f 2 | cut -d+ -f 2)" | ||
echo "::set-env name=JVMCI_VERSION::$(echo $LABSJDK_VERSION | cut -d- -f 3,4,5)" | ||
- name: Get labsJDK11 | ||
run: | | ||
export JDK_VERSION=${{ env.JDK_VERSION }} | ||
export JDK_VERSION_SUFFIX=${{ env.JDK_VERSION_SUFFIX }} | ||
export JVMCI_VERSION=${{ env.JVMCI_VERSION }} | ||
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" | ||
tar xf labsjdk-ce-${JDK_VERSION}${JDK_VERSION_SUFFIX}-${JVMCI_VERSION}-linux-amd64.tar.gz | ||
labsjdk-ce-${JDK_VERSION}-${JVMCI_VERSION}/bin/java --version | ||
- name: Build graalvm native-image | ||
run: | | ||
export JAVA_HOME=${GITHUB_WORKSPACE}/labsjdk-ce-${{ env.JDK_VERSION }}-${{ env.JVMCI_VERSION }} | ||
cd substratevm | ||
../../mx/mx --components="Native Image" build | ||
mv $(../../mx/mx --components="Native Image" graalvm-home) ~/graaljdk | ||
~/graaljdk/bin/native-image --version | ||
- name: Tar GraalVM | ||
shell: bash | ||
run: tar -czvf graaljdk.tgz -C ~ graaljdk | ||
- name: Persist GraalVM build | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: graaljdk | ||
path: graaljdk.tgz | ||
- name: Build quarkus | ||
run: | | ||
export JAVA_HOME=${GITHUB_WORKSPACE}/labsjdk-ce-${{ env.JDK_VERSION }}-${{ env.JVMCI_VERSION }} | ||
cd ${GITHUB_WORKSPACE}/quarkus | ||
eval ./mvnw -e -B -DskipTests -DskipDocs clean install | ||
- name: Tar Maven Repo | ||
shell: bash | ||
run: tar -czvf maven-repo.tgz -C ~ .m2/repository | ||
- name: Persist Maven Repo | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: maven-repo | ||
path: maven-repo.tgz | ||
|
||
native-tests: | ||
name: Native Tests - ${{matrix.category}} | ||
needs: build-quarkus-and-graalvm | ||
runs-on: ubuntu-latest | ||
# Ignore the following YAML Schema error | ||
timeout-minutes: ${{matrix.timeout}} | ||
strategy: | ||
max-parallel: 8 | ||
fail-fast: false | ||
matrix: | ||
category: [Main, Data1, Data2, Data3, Data4, Data5, Data6, Security1, Security2, Security3, Amazon, Messaging, Cache, HTTP, Misc1, Misc2, Misc3, Misc4, Spring, gRPC] | ||
include: | ||
- category: Main | ||
postgres: "true" | ||
timeout: 40 | ||
test-modules: main | ||
- category: Data1 | ||
mariadb: "true" | ||
mssql: "true" | ||
timeout: 65 | ||
test-modules: > | ||
jpa-h2 | ||
jpa-mariadb | ||
jpa-mssql | ||
jpa-derby | ||
jpa-without-entity | ||
hibernate-tenancy | ||
- category: Data2 | ||
db2: "true" | ||
mysql: "true" | ||
mariadb: "true" | ||
timeout: 65 | ||
test-modules: > | ||
jpa | ||
jpa-mysql | ||
jpa-db2 | ||
reactive-mysql-client | ||
reactive-db2-client | ||
hibernate-reactive-db2 | ||
hibernate-reactive-mysql | ||
- category: Data3 | ||
postgres: "true" | ||
timeout: 70 | ||
test-modules: > | ||
flyway | ||
hibernate-orm-panache | ||
hibernate-orm-panache-kotlin | ||
hibernate-orm-envers | ||
liquibase | ||
- category: Data4 | ||
neo4j: "true" | ||
redis: "true" | ||
timeout: 55 | ||
test-modules: > | ||
mongodb-client | ||
mongodb-panache | ||
redis-client | ||
neo4j | ||
hibernate-orm-rest-data-panache | ||
- category: Data5 | ||
postgres: "true" | ||
timeout: 65 | ||
test-modules: > | ||
jpa-postgresql | ||
narayana-stm | ||
narayana-jta | ||
reactive-pg-client | ||
hibernate-reactive-postgresql | ||
- category: Data6 | ||
postgres: "true" | ||
timeout: 40 | ||
test-modules: > | ||
elasticsearch-rest-client | ||
elasticsearch-rest-high-level-client | ||
hibernate-search-elasticsearch | ||
- category: Amazon | ||
amazonServices: "true" | ||
timeout: 45 | ||
test-modules: > | ||
amazon-services | ||
amazon-lambda | ||
amazon-lambda-http | ||
- category: Messaging | ||
timeout: 75 | ||
test-modules: > | ||
artemis-core | ||
artemis-jms | ||
kafka | ||
kafka-streams | ||
reactive-messaging-amqp | ||
- category: Security1 | ||
timeout: 50 | ||
keycloak: "true" | ||
test-modules: > | ||
elytron-security-oauth2 | ||
elytron-security | ||
elytron-security-jdbc | ||
elytron-undertow | ||
elytron-security-ldap | ||
- category: Security2 | ||
timeout: 70 | ||
keycloak: "true" | ||
test-modules: > | ||
elytron-resteasy | ||
oidc | ||
oidc-code-flow | ||
oidc-tenancy | ||
keycloak-authorization | ||
- category: Security3 | ||
timeout: 50 | ||
test-modules: > | ||
vault | ||
vault-app | ||
vault-agroal | ||
- category: Cache | ||
timeout: 55 | ||
test-modules: > | ||
infinispan-cache-jpa | ||
infinispan-client | ||
cache | ||
- category: HTTP | ||
timeout: 60 | ||
test-modules: > | ||
resteasy-jackson | ||
resteasy-mutiny | ||
vertx | ||
vertx-http | ||
vertx-web | ||
vertx-graphql | ||
virtual-http | ||
rest-client | ||
- category: Misc1 | ||
timeout: 60 | ||
test-modules: > | ||
maven | ||
jackson | ||
jsonb | ||
jsch | ||
jgit | ||
quartz | ||
qute | ||
consul-config | ||
- category: Misc2 | ||
timeout: 55 | ||
test-modules: > | ||
tika | ||
hibernate-validator | ||
test-extension | ||
logging-gelf | ||
bootstrap-config | ||
# kubernetes-client alone takes 30mn+ | ||
- category: Misc3 | ||
timeout: 60 | ||
test-modules: > | ||
kubernetes-client | ||
- category: Misc4 | ||
timeout: 30 | ||
test-modules: > | ||
smallrye-graphql | ||
picocli-native | ||
gradle | ||
- category: Spring | ||
timeout: 50 | ||
test-modules: > | ||
spring-di | ||
spring-web | ||
spring-data-jpa | ||
spring-boot-properties | ||
spring-cloud-config-client | ||
- category: gRPC | ||
timeout: 65 | ||
test-modules: > | ||
grpc-health | ||
grpc-interceptors | ||
grpc-mutual-auth | ||
grpc-plain-text | ||
grpc-proto-v2 | ||
grpc-streaming | ||
grpc-tls | ||
steps: | ||
# These should be services, but services do not (yet) allow conditional execution | ||
- name: Postgres Service | ||
run: | | ||
docker run --rm --publish 5432:5432 --name build-postgres \ | ||
-e POSTGRES_USER=$DB_USER -e POSTGRES_PASSWORD=$DB_PASSWORD -e POSTGRES_DB=$DB_NAME \ | ||
-d postgres:10.5 | ||
if: matrix.postgres | ||
- name: MySQL Service | ||
run: | | ||
sudo service mysql stop || true | ||
docker run --rm --publish 3306:3306 --name build-mysql \ | ||
-e MYSQL_USER=$DB_USER -e MYSQL_PASSWORD=$DB_PASSWORD -e MYSQL_DATABASE=$DB_NAME -e MYSQL_RANDOM_ROOT_PASSWORD=true \ | ||
-d mysql:5 --skip-ssl | ||
if: matrix.mysql | ||
- name: DB2 Service | ||
run: | | ||
docker run --rm --publish 50000:50000 --name build-db2 --privileged=true \ | ||
-e DB2INSTANCE=hreact -e DB2INST1_PASSWORD=hreact -e DBNAME=hreact -e LICENSE=accept -e AUTOCONFIG=false -e ARCHIVE_LOGS=false \ | ||
-d ibmcom/db2:11.5.0.0a | ||
if: matrix.db2 | ||
- name: Maria DB Service | ||
run: | | ||
docker run --rm --publish 3308:3306 --name build-mariadb \ | ||
-e MYSQL_USER=$DB_USER -e MYSQL_PASSWORD=$DB_PASSWORD -e MYSQL_DATABASE=$DB_NAME -e MYSQL_ROOT_PASSWORD=secret \ | ||
-d mariadb:10.4 | ||
if: matrix.mariadb | ||
- name: MS-SQL Service | ||
run: | | ||
docker run --rm --publish 1433:1433 --name build-mssql \ | ||
-e ACCEPT_EULA=Y -e SA_PASSWORD=ActuallyRequired11Complexity \ | ||
-d microsoft/mssql-server-linux:2017-CU13 | ||
if: matrix.mssql | ||
- name: Amazon Services | ||
run: | | ||
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 \ | ||
-d localstack/localstack:0.11.1 | ||
if: matrix.amazonServices | ||
- name: Neo4j Service | ||
run: | | ||
docker run --rm --publish 7687:7687 --name build-neo4j \ | ||
-e NEO4J_AUTH=neo4j/secret -e NEO4J_dbms_memory_pagecache_size=10M -e NEO4J_dbms_memory_heap_initial__size=10M \ | ||
-d neo4j/neo4j-experimental:4.0.0-rc01 | ||
if: matrix.neo4j | ||
- name: Redis Service | ||
run: docker run --rm --publish 6379:6379 --name build-redis -d redis:5.0.8-alpine | ||
if: matrix.redis | ||
- name: Keycloak Service | ||
run: | | ||
docker run --rm --publish 8180:8080 --publish 8543:8443 --name build-keycloak \ | ||
-e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -e JAVA_OPTS=" \ | ||
-server -Xms64m -Xmx512m -XX:MetaspaceSize=96M \ | ||
-XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true \ | ||
-Dkeycloak.profile.feature.upload_scripts=enabled" \ | ||
-d quay.io/keycloak/keycloak:11.0.0 | ||
if: matrix.keycloak | ||
- name: Download GraalVM build | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: graaljdk | ||
path: . | ||
- name: Extract GraalVM build | ||
shell: bash | ||
run: tar -xzvf graaljdk.tgz -C ${GITHUB_WORKSPACE} | ||
- name: Get latest quarkus release | ||
run: | | ||
curl --output quarkus.tgz -sL $(curl -sL https://api.github.com/repos/quarkusio/quarkus/releases/latest | jq -r .tarball_url) | ||
mkdir ${GITHUB_WORKSPACE}/quarkus | ||
tar xf quarkus.tgz -C ${GITHUB_WORKSPACE}/quarkus --strip-components=1 | ||
- name: Reclaim Disk Space | ||
run: ${GITHUB_WORKSPACE}/quarkus/.github/ci-prerequisites.sh | ||
- name: Download Maven Repo | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: maven-repo | ||
path: . | ||
- name: Extract Maven Repo | ||
shell: bash | ||
run: tar -xzf maven-repo.tgz -C ~ | ||
- name: Build with Maven | ||
env: | ||
TEST_MODULES: ${{matrix.test-modules}} | ||
CATEGORY: ${{matrix.category}} | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/quarkus | ||
export JAVA_HOME=${GITHUB_WORKSPACE}/graaljdk | ||
export GRAALVM_HOME=${GITHUB_WORKSPACE}/graaljdk | ||
${GRAALVM_HOME}/bin/native-image --version | ||
for i in $TEST_MODULES | ||
do modules+=("integration-tests/$i"); done | ||
IFS=, | ||
eval mvn -pl "${modules[*]}" $NATIVE_TEST_MAVEN_OPTS | ||
# add the 'simple with spaces' project to the run of 'Misc1' by executing it explicitly | ||
# done because there is no good way to pass strings with empty values to the previous command | ||
# so this hack is as good as any | ||
if [ "$CATEGORY" == "Misc1" ]; then | ||
mvn -Dnative -Dquarkus.native.container-build=true -B --settings ${GITHUB_WORKSPACE}/quarkus/.github/mvn-settings.xml -f 'integration-tests/simple with space/' verify | ||
fi | ||
- name: Prepare failure archive (if maven failed) | ||
if: failure() | ||
shell: bash | ||
run: find . -type d -name '*-reports' -o -wholename '*/build/reports/tests/functionalTest' | tar -czf test-reports.tgz -T - | ||
- name: Upload failure Archive (if maven failed) | ||
uses: actions/upload-artifact@v1 | ||
if: failure() | ||
with: | ||
name: test-reports-native-${{matrix.category}} | ||
path: 'test-reports.tgz' |