From 9e6f7b1790b5a6b71fd821adb5414ec9a38eb155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Tue, 25 Aug 2020 15:11:53 +0200 Subject: [PATCH] Start Elasticsearch in the GitHub actions build --- .github/workflows/ci-actions.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-actions.yml b/.github/workflows/ci-actions.yml index 4a03183cced787..b2dca4eab8f1e5 100644 --- a/.github/workflows/ci-actions.yml +++ b/.github/workflows/ci-actions.yml @@ -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 -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" - JVM_TEST_MAVEN_OPTS: "-e -B --settings .github/mvn-settings.xml -Dtest-postgresql -Dtest-elasticsearch -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-keycloak -Dtest-redis -Dformat.skip" + 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 -Dnative-image.xmx=5g -Dnative -Dnative.surefire.skip -Dformat.skip -Dno-descriptor-tests install" + 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-keycloak -Dtest-redis -Dformat.skip" DB_USER: hibernate_orm_test DB_PASSWORD: hibernate_orm_test DB_NAME: hibernate_orm_test @@ -181,6 +181,12 @@ jobs: image: redis:5.0.8-alpine ports: - 127.0.0.1:6379:6379 + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.8.0 + env: + discovery.type: single-node + ports: + - 127.0.0.1:9200:9200 steps: - name: Start mysql shell: bash @@ -451,6 +457,7 @@ jobs: hibernate-reactive-postgresql - category: Data6 postgres: "true" + elasticsearch: "true" timeout: 40 test-modules: > elasticsearch-rest-client @@ -616,6 +623,12 @@ jobs: -Dkeycloak.profile.feature.upload_scripts=enabled" \ -d quay.io/keycloak/keycloak:11.0.0 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.8.0 + if: matrix.elasticsearch - uses: actions/checkout@v2 - name: Set up JDK 11 # Uses sha for added security since tags can be updated