Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify container testing #13134

Merged
merged 4 commits into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 2 additions & 78 deletions .github/workflows/ci-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ on:
env:
# Workaround testsuite locale issue
LANG: en_US.UTF-8
NATIVE_TEST_MAVEN_OPTS: "-B --settings .github/mvn-settings.xml --fail-at-end -Dquarkus.native.container-build=true -Dtest-postgresql -Dtest-elasticsearch -Delasticsearch.hosts='localhost:9200' -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 -Dtest-mailer -Dnative-image.xmx=5g -Dnative -Dnative.surefire.skip -Dformat.skip -Dno-descriptor-tests install -DskipDocs"
JVM_TEST_MAVEN_OPTS: "-e -B --settings .github/mvn-settings.xml -Dtest-postgresql -Dtest-elasticsearch -Delasticsearch.hosts='localhost:9200' -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-amazon-services -Dtest-vault -Dtest-neo4j -Dtest-kafka -Dtest-mailer -Dtest-keycloak -Dtest-redis -Dformat.skip -DskipDocs -Ddocker"
NATIVE_TEST_MAVEN_OPTS: "-B --settings .github/mvn-settings.xml --fail-at-end -Dquarkus.native.container-build=true -Dtest-containers -Dstart-containers -Dnative-image.xmx=5g -Dnative -Dnative.surefire.skip -Dformat.skip -Dno-descriptor-tests install -DskipDocs"
JVM_TEST_MAVEN_OPTS: "-e -B --settings .github/mvn-settings.xml -Dtest-containers -Dstart-containers -Dformat.skip -DskipDocs"
DB_USER: hibernate_orm_test
DB_PASSWORD: hibernate_orm_test
DB_NAME: hibernate_orm_test
Expand Down Expand Up @@ -479,42 +479,27 @@ jobs:
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: IT-Main
postgres: "true"
timeout: 40
- category: IT-Data1
mariadb: "true"
mssql: "true"
timeout: 65
- category: IT-Data2
db2: "true"
mysql: "true"
mariadb: "true"
timeout: 65
- category: IT-Data3
postgres: "true"
timeout: 70
- category: IT-Data4
neo4j: "true"
redis: "true"
timeout: 55
- category: IT-Data5
postgres: "true"
timeout: 65
- category: IT-Data6
postgres: "true"
elasticsearch: "true"
timeout: 40
- category: IT-Amazon
amazonServices: "true"
timeout: 45
- category: IT-Messaging
timeout: 85
- category: IT-Security1
timeout: 50
keycloak: "true"
- category: IT-Security2
timeout: 70
keycloak: "true"
- category: IT-Security3
timeout: 50
- category: IT-Cache
Expand All @@ -535,67 +520,6 @@ jobs:
- category: IT-gRPC
timeout: 65
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.2
if: matrix.keycloak
- name: Elasticsearch Service
run: |
docker run --rm --publish 9200:9200 --name build-elasticsearch \
-e discovery.type=single-node \
-d docker.elastic.co/elasticsearch/elasticsearch-oss:7.9.2
if: matrix.elasticsearch
- uses: actions/checkout@v2
- name: Set up JDK 11
# Uses sha for added security since tags can be updated
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/native-cron-build.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
run: mvn -B install -DskipTests -DskipITs -Dformat.skip

- name: Run integration tests in native
run: mvn -B --settings .github/mvn-settings.xml verify -f integration-tests/pom.xml --fail-at-end -Dno-format -Ddocker -Dnative -Dquarkus.native.container-build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:20.2.0-java${{ matrix.java }} -Dtest-postgresql -Dtest-elasticsearch -Dtest-mysql -Dtest-db2 -Dtest-amazon-services -Dtest-vault -Dtest-neo4j -Dtest-keycloak -Dtest-kafka -Dtest-mssql -Dtest-mariadb -Dmariadb.url="jdbc:mariadb://localhost:3308/hibernate_orm_test" -pl '!io.quarkus:quarkus-integration-test-google-cloud-functions-http,!io.quarkus:quarkus-integration-test-google-cloud-functions,!io.quarkus:quarkus-integration-test-funqy-google-cloud-functions'
run: mvn -B --settings .github/mvn-settings.xml verify -f integration-tests/pom.xml --fail-at-end -Dno-format -Dtest-containers -Dstart-containers -Dnative -Dquarkus.native.container-build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:20.2.0-java${{ matrix.java }} -pl '!io.quarkus:quarkus-integration-test-google-cloud-functions-http,!io.quarkus:quarkus-integration-test-google-cloud-functions,!io.quarkus:quarkus-integration-test-funqy-google-cloud-functions'

- name: Report
if: always()
Expand Down
4 changes: 2 additions & 2 deletions extensions/keycloak-authorization/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<id>test-keycloak</id>
<activation>
<property>
<name>test-keycloak</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand All @@ -109,7 +109,7 @@
<id>docker-keycloak</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down
4 changes: 2 additions & 2 deletions extensions/oidc/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<id>test-keycloak</id>
<activation>
<property>
<name>test-keycloak</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand All @@ -134,7 +134,7 @@
<id>docker-keycloak</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
<id>test-postgresql</id>
<activation>
<property>
<name>test-postgresql</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand All @@ -150,7 +150,7 @@
<id>docker-postgresql</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down
4 changes: 2 additions & 2 deletions extensions/reactive-mysql-client/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<id>test-mariadb</id>
<activation>
<property>
<name>test-mariadb</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand All @@ -127,7 +127,7 @@
<id>docker-mariadb</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down
4 changes: 2 additions & 2 deletions extensions/reactive-pg-client/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<id>test-postgresql</id>
<activation>
<property>
<name>test-postgresql</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand All @@ -112,7 +112,7 @@
<id>docker-postgresql</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/amazon-services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
<id>test-amazon-services</id>
<activation>
<property>
<name>test-amazon-services</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand Down Expand Up @@ -343,7 +343,7 @@
<id>docker-aws-stack</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<id>container-image-docker</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
<os>
<family>linux</family>
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/elasticsearch-rest-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<id>test-elasticsearch</id>
<activation>
<property>
<name>test-elasticsearch</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand All @@ -146,7 +146,7 @@
<id>docker-elasticsearch</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<id>test-elasticsearch</id>
<activation>
<property>
<name>test-elasticsearch</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand All @@ -147,7 +147,7 @@
<id>docker-elasticsearch</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/hibernate-reactive-db2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
<id>test-db2</id>
<activation>
<property>
<name>test-db2</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand Down Expand Up @@ -224,7 +224,7 @@
<id>docker-db2</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/hibernate-reactive-mysql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<id>test-mariadb</id>
<activation>
<property>
<name>test-mariadb</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand Down Expand Up @@ -224,7 +224,7 @@
<id>docker-mariadb</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/hibernate-reactive-panache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
<id>test-postgresql</id>
<activation>
<property>
<name>test-postgresql</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand Down Expand Up @@ -388,7 +388,7 @@
<id>docker-postgresql</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/hibernate-reactive-postgresql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<id>test-postgresql</id>
<activation>
<property>
<name>test-postgresql</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand Down Expand Up @@ -225,7 +225,7 @@
<id>docker-postgresql</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ By default, the tests of this module are disabled.
To run the tests in a standard JVM with Elasticsearch started in the JVM, you can run the following command:

```
mvn clean install -Dtest-elasticsearch
mvn clean install -Dtest-containers
```

Additionally, you can generate a native image and run the tests for this native image by adding `-Dnative`:

```
mvn clean install -Dtest-elasticsearch -Dnative
mvn clean install -Dtest-containers -Dnative
```

4 changes: 2 additions & 2 deletions integration-tests/hibernate-search-orm-elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
<id>test-elasticsearch</id>
<activation>
<property>
<name>test-elasticsearch</name>
<name>test-containers</name>
</property>
</activation>
<build>
Expand All @@ -160,7 +160,7 @@
<id>docker-elasticsearch</id>
<activation>
<property>
<name>docker</name>
<name>start-containers</name>
</property>
</activation>
<properties>
Expand Down
Loading