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