From d67bd117f472686dbe9481bd7a5d08d8f64b47f2 Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Mon, 13 Jul 2020 12:54:43 +0300 Subject: [PATCH] Creates maven profiles for integration tests Allows running groups of test in CI builds with commands like: mvn -e -pl integration-tests -amd -PIT-Security1 verify mvn -e -pl integration-tests -amd -Dnative -PIT-Security1 verify mvn -e -pl integration-tests -amd -Dno-format -DskipDocs -Dnative -PIT-Security1 verify etc. --- .github/workflows/ci-actions.yml | 170 ++---------- integration-tests/pom.xml | 442 +++++++++++++++++++++---------- 2 files changed, 329 insertions(+), 283 deletions(-) diff --git a/.github/workflows/ci-actions.yml b/.github/workflows/ci-actions.yml index b3c173a30e622c..86d2f9fe72cd0c 100644 --- a/.github/workflows/ci-actions.yml +++ b/.github/workflows/ci-actions.yml @@ -399,187 +399,64 @@ jobs: 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] + category: [IT-Main, IT-Data1, IT-Data2, IT-Data3, IT-Data4, IT-Data5, IT-Data6, IT-Security1, IT-Security2, IT-Security3, IT-Amazon, IT-Messaging, IT-Cache, IT-HTTP, IT-Misc1, IT-Misc2, IT-Misc3, IT-Misc4, IT-Spring, IT-gRPC] include: - - category: Main + - category: IT-Main postgres: "true" timeout: 40 - test-modules: main - - category: Data1 + - category: IT-Data1 mariadb: "true" mssql: "true" timeout: 65 - test-modules: > - jpa-h2 - jpa-mariadb - jpa-mssql - jpa-derby - jpa-without-entity - hibernate-tenancy - - category: Data2 + - category: IT-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 + - category: IT-Data3 postgres: "true" timeout: 70 - test-modules: > - flyway - hibernate-orm-panache - hibernate-orm-panache-kotlin - hibernate-orm-envers - liquibase - - category: Data4 + - category: IT-Data4 neo4j: "true" redis: "true" timeout: 55 - test-modules: > - mongodb-client - mongodb-panache - redis-client - neo4j - hibernate-orm-rest-data-panache - - category: Data5 + - category: IT-Data5 postgres: "true" timeout: 65 - test-modules: > - jpa-postgresql - narayana-stm - narayana-jta - reactive-pg-client - hibernate-reactive-postgresql - category: Data6 postgres: "true" elasticsearch: "true" timeout: 40 - test-modules: > - elasticsearch-rest-client - elasticsearch-rest-high-level-client - hibernate-search-orm-elasticsearch - - category: Amazon + - category: IT-Amazon amazonServices: "true" timeout: 45 - test-modules: > - amazon-services - amazon-lambda - amazon-lambda-http - - category: Messaging + - category: IT-Messaging timeout: 85 - test-modules: > - artemis-core - artemis-jms - kafka - kafka-streams - reactive-messaging-amqp - reactive-messaging-kafka - - category: Security1 + - category: IT-Security1 timeout: 50 keycloak: "true" - test-modules: > - elytron-security-oauth2 - elytron-security - elytron-security-jdbc - elytron-undertow - elytron-security-ldap - - category: Security2 + - category: IT-Security2 timeout: 70 keycloak: "true" - test-modules: > - oidc - oidc-code-flow - oidc-tenancy - keycloak-authorization - oidc-wiremock - - category: Security3 + - category: IT-Security3 timeout: 50 - test-modules: > - vault - vault-app - vault-agroal - - category: Cache + - category: IT-Cache timeout: 55 - test-modules: > - infinispan-cache-jpa - infinispan-client - cache - - category: HTTP + - category: IT-HTTP timeout: 60 - test-modules: > - elytron-resteasy - resteasy-jackson - resteasy-mutiny - vertx - vertx-http - vertx-web - vertx-graphql - virtual-http - rest-client - - category: Misc1 + - category: IT-Misc1 timeout: 65 - test-modules: > - maven - jackson - jsonb - jsch - jgit - quartz - qute - consul-config - - category: Misc2 + - category: IT-Misc2 timeout: 65 - test-modules: > - tika - hibernate-validator - test-extension - logging-gelf - bootstrap-config - mailer # kubernetes-client alone takes 30mn+ - - category: Misc3 + - category: IT-Misc3 timeout: 65 - test-modules: > - kubernetes-client - openshift-client - - category: Misc4 + - category: IT-Misc4 timeout: 65 - test-modules: > - smallrye-config - smallrye-graphql - picocli-native - gradle - micrometer-mp-metrics - micrometer-prometheus - smallrye-metrics - logging-json - jaxp - - category: Spring + - category: IT-Spring timeout: 50 - test-modules: > - spring-di - spring-web - spring-data-jpa - spring-boot-properties - spring-cloud-config-client - - category: gRPC + - category: IT-gRPC timeout: 65 - test-modules: > - grpc-health - grpc-interceptors - grpc-mutual-auth - grpc-plain-text - grpc-plain-text-mutiny - grpc-proto-v2 - grpc-streaming - grpc-tls steps: # These should be services, but services do not (yet) allow conditional execution - name: Postgres Service @@ -660,17 +537,14 @@ jobs: run: tar -xzf maven-repo.tgz -C ~ - name: Build with Maven env: - TEST_MODULES: ${{matrix.test-modules}} CATEGORY: ${{matrix.category}} run: | - for i in $TEST_MODULES - do modules+=("integration-tests/$i"); done IFS=, - eval mvn -pl "${modules[*]}" $NATIVE_TEST_MAVEN_OPTS + eval mvn -pl integration-tests -amd -P$CATEGORY $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 + if [ "$CATEGORY" == "IT-Misc1" ]; then mvn -Dnative -Dquarkus.native.container-build=true -B --settings .github/mvn-settings.xml -f 'integration-tests/simple with space/' verify fi - name: Prepare failure archive (if maven failed) diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 342d5b780c3422..e4df605b00603c 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -22,142 +22,314 @@ ${skipTests} - - funqy-amazon-lambda - funqy-google-cloud-functions - class-transformer - shared-library - hibernate-validator - common-jpa-entities - infinispan-client - devtools - gradle - main - kafka - kafka-avro - kafka-streams - jpa - jpa-db2 - jpa-derby - jpa-postgresql - vault - vault-agroal - vault-app - jpa-mariadb - jpa-h2 - jpa-mssql - jpa-mysql - hibernate-orm-panache - hibernate-orm-rest-data-panache - hibernate-orm-panache-kotlin - hibernate-reactive-db2 - hibernate-reactive-mysql - hibernate-reactive-postgresql - hibernate-reactive-panache - hibernate-search-orm-elasticsearch - hibernate-tenancy - hibernate-orm-envers - vertx-http - vertx-web - vertx - spring-di - spring-web - spring-data-jpa - spring-boot-properties - spring-cloud-config-client - infinispan-cache-jpa - elytron-security - elytron-security-oauth2 - elytron-resteasy - elytron-undertow - flyway - liquibase - oidc - oidc-code-flow - oidc-tenancy - oidc-wiremock - keycloak-authorization - reactive-db2-client - reactive-pg-client - reactive-mysql-client - amazon-services - test-extension - amazon-lambda - amazon-lambda-stream-handler - amazon-lambda-http - amazon-lambda-http-resteasy - container-image - kubernetes - kubernetes-client - openshift-client - tika - neo4j - mongodb-client - jackson - jsonb - resteasy-jackson - resteasy-mutiny - jgit - jsch - virtual-http - virtual-http-resteasy - artemis-core - artemis-jms - maven - scala - kotlin - mongodb-panache - mongodb-panache-kotlin - mongodb-rest-data-panache - narayana-stm - narayana-jta - elytron-security-jdbc - elytron-security-ldap - vertx-graphql - smallrye-config - smallrye-context-propagation - smallrye-metrics - smallrye-graphql - jpa-without-entity - quartz - redis-client - logging-gelf - cache - qute - bootstrap-config - injectmock - reactive-messaging-amqp - reactive-messaging-kafka - rest-client - packaging - simple with space - consul-config - picocli - picocli-native - webjars-locator - devmode - ide-launcher - elasticsearch-rest-client - elasticsearch-rest-high-level-client - micrometer-jmx - micrometer-mp-metrics - micrometer-prometheus - logging-json - jaxp - mailer + + + default + + true + + + funqy-amazon-lambda + funqy-google-cloud-functions + class-transformer + shared-library + common-jpa-entities + kafka-avro + test-extension + amazon-lambda-stream-handler + amazon-lambda-http-resteasy + container-image + kubernetes + virtual-http-resteasy + scala + kotlin + smallrye-context-propagation + injectmock + packaging + simple with space + picocli + webjars-locator + devmode + ide-launcher + devtools + hibernate-reactive-panache + mongodb-panache-kotlin + mongodb-rest-data-panache + micrometer-jmx - - grpc-tls - grpc-plain-text - grpc-plain-text-mutiny - grpc-mutual-auth - grpc-streaming - grpc-interceptors - grpc-proto-v2 - grpc-health - google-cloud-functions-http - google-cloud-functions - + + google-cloud-functions-http + google-cloud-functions + + + + IT-Main + + true + + + main + + + + IT-Data1 + + true + + + jpa-h2 + jpa-mariadb + jpa-mssql + jpa-derby + jpa-without-entity + hibernate-tenancy + + + + IT-Data2 + + true + + + jpa + jpa-mysql + jpa-db2 + reactive-mysql-client + reactive-db2-client + hibernate-reactive-db2 + hibernate-reactive-mysql + + + + IT-Data3 + + true + + + flyway + hibernate-orm-panache + hibernate-orm-panache-kotlin + hibernate-orm-envers + liquibase + + + + IT-Data4 + + true + + + mongodb-client + mongodb-panache + redis-client + neo4j + hibernate-orm-rest-data-panache + + + + IT-Data5 + + true + + + jpa-postgresql + narayana-stm + narayana-jta + reactive-pg-client + hibernate-reactive-postgresql + + + + IT-Data6 + + true + + + elasticsearch-rest-client + elasticsearch-rest-high-level-client + hibernate-search-orm-elasticsearch + + + + IT-Amazon + + true + + + amazon-services + amazon-lambda + amazon-lambda-http + + + + IT-Messaging + + true + + + artemis-core + artemis-jms + kafka + kafka-streams + reactive-messaging-amqp + reactive-messaging-kafka + + + + IT-Security1 + + true + + + elytron-security-oauth2 + elytron-security + elytron-security-jdbc + elytron-undertow + elytron-security-ldap + + + + IT-Security2 + + true + + + oidc + oidc-code-flow + oidc-tenancy + keycloak-authorization + oidc-wiremock + + + + IT-Security3 + + true + + + vault + vault-app + vault-agroal + + + + IT-Cache + + true + + + infinispan-cache-jpa + infinispan-client + cache + + + + IT-HTTP + + true + + + elytron-resteasy + resteasy-jackson + resteasy-mutiny + vertx + vertx-http + vertx-web + vertx-graphql + virtual-http + rest-client + + + + IT-Misc1 + + true + + + maven + jackson + jsonb + jsch + jgit + quartz + qute + consul-config + + + + IT-Misc2 + + true + + + tika + hibernate-validator + test-extension + logging-gelf + bootstrap-config + mailer + + + + IT-Misc3 + + true + + + kubernetes-client + openshift-client + + + + IT-Misc4 + + true + + + true + + + smallrye-config + smallrye-graphql + picocli-native + gradle + micrometer-mp-metrics + micrometer-prometheus + smallrye-metrics + logging-json + jaxp + + + + IT-Spring + + true + + + spring-di + spring-web + spring-data-jpa + spring-boot-properties + spring-cloud-config-client + + + + IT-gRPC + + true + + + grpc-health + grpc-interceptors + grpc-mutual-auth + grpc-plain-text + grpc-plain-text-mutiny + grpc-proto-v2 + grpc-streaming + grpc-tls + + +