This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch opensearch-persistence
in repository https://gitbox.apache.org/repos/asf/unomi.git


The following commit(s) were added to refs/heads/opensearch-persistence by this 
push:
     new e8ca52a05 Update CI workflow to use actions/setup-java@v4 and improve 
OpenSearch integration test instructions in documentation
e8ca52a05 is described below

commit e8ca52a05cd6e80ff14c548dfa8af64dacad4b08
Author: Serge Huber <[email protected]>
AuthorDate: Tue Oct 14 13:23:59 2025 +0200

    Update CI workflow to use actions/setup-java@v4 and improve OpenSearch 
integration test instructions in documentation
---
 .github/workflows/unomi-ci-build-tests.yml         | 25 ++++++++++++++--------
 itests/README.md                                   |  4 +++-
 .../src/main/asciidoc/building-and-deploying.adoc  | 11 +++++++++-
 3 files changed, 29 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/unomi-ci-build-tests.yml 
b/.github/workflows/unomi-ci-build-tests.yml
index e512bc9c5..679353d11 100644
--- a/.github/workflows/unomi-ci-build-tests.yml
+++ b/.github/workflows/unomi-ci-build-tests.yml
@@ -17,10 +17,11 @@ jobs:
     steps:
     - uses: actions/checkout@v4
     - name: Set up JDK 17
-      uses: actions/setup-java@v1
+      uses: actions/setup-java@v4
       with:
-        java-version: 17
-        cache: maven
+        distribution: 'temurin'
+        java-version: '17'
+        cache: 'maven'
     - name: Build and Unit tests
       run: mvn -U -ntp -e clean install
 
@@ -39,15 +40,21 @@ jobs:
     steps:
       - uses: actions/checkout@v4
       - name: Set up JDK 17
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v4
         with:
-          java-version: 17
-          cache: maven
+          distribution: 'temurin'
+          java-version: '17'
+          cache: 'maven'
       - name: Integration tests
         run: |
-          mvn -ntp clean install -Pintegration-tests,${{ matrix.search-engine 
}} \
-          -Dopensearch.port=${{ matrix.port }} \
-          -Delasticsearch.port=${{ matrix.port }}
+          FLAGS="-Pintegration-tests"
+          if [ "${{ matrix.search-engine }}" = "opensearch" ]; then
+            # Trigger OpenSearch profile activation via property; do not pass 
any -P profile toggles
+            FLAGS="$FLAGS -Duse.opensearch=true"
+          fi
+          mvn -ntp clean install $FLAGS \
+            -Dopensearch.port=${{ matrix.port }} \
+            -Delasticsearch.port=${{ matrix.port }}
       - name: Archive code coverage logs
         uses: actions/upload-artifact@v4
         if: false # UNOMI-746 Reactivate if necessary
diff --git a/itests/README.md b/itests/README.md
index 6ec6efdcb..3c4216660 100644
--- a/itests/README.md
+++ b/itests/README.md
@@ -64,7 +64,9 @@ Apache Unomi supports both ElasticSearch and OpenSearch as 
search engine backend
 # Run with ElasticSearch (default)
 mvn clean install -P integration-tests
 
-# Run with OpenSearch 
+# Run with OpenSearch
+# Activate via property only. Do not pass -P opensearch or !elasticsearch;
+# the property alone handles activation/deactivation.
 mvn clean install -P integration-tests -Duse.opensearch=true
 ```
 
diff --git a/manual/src/main/asciidoc/building-and-deploying.adoc 
b/manual/src/main/asciidoc/building-and-deploying.adoc
index 65ab82a34..8c3f178a6 100644
--- a/manual/src/main/asciidoc/building-and-deploying.adoc
+++ b/manual/src/main/asciidoc/building-and-deploying.adoc
@@ -279,13 +279,22 @@ to use these tests is to run them from a continuous 
integration server such as J
 
 Note : the integration tests require a JDK 11 or more recent !
 
-To run the tests simply activate the following profile :
+To run the tests simply activate the following profile:
 
 [source]
 ----
 mvn -P integration-tests clean install
 ----
 
+===== Selecting the Search Engine for Integration Tests
+
+By default, integration tests target ElasticSearch. To run them against 
OpenSearch, set the activation property used by the OpenSearch profile (no 
additional -P flags are required):
+
+[source]
+----
+mvn -P integration-tests -Duse.opensearch=true clean install
+----
+
 ==== Testing with an example page
 
 A default test page is provided at the following URL:

Reply via email to