Skip to content

Commit

Permalink
Creates maven profiles for integration tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zakkak committed Oct 22, 2020
1 parent 6312680 commit 73867aa
Show file tree
Hide file tree
Showing 2 changed files with 330 additions and 283 deletions.
170 changes: 22 additions & 148 deletions .github/workflows/ci-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
Loading

0 comments on commit 73867aa

Please sign in to comment.