Skip to content

[UNOMI-828] Support for OpenSearch persistence #1645

[UNOMI-828] Support for OpenSearch persistence

[UNOMI-828] Support for OpenSearch persistence #1645

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Build and run tests
on:
push:
branches: [master]
pull_request:
types: [opened, reopened, synchronize]
jobs:
unit-tests:
name: Execute unit tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build and Unit tests
run: mvn -U -ntp -e clean install
integration-tests:
name: Execute integration tests
needs: unit-tests
runs-on: ubuntu-latest
strategy:
matrix:
include:
- search-engine: elasticsearch
port: 9400
- search-engine: opensearch
port: 9401
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Integration tests
run: |
mvn -ntp clean install -Pintegration-tests,${{ matrix.search-engine }} \
-Dopensearch.port=${{ matrix.port }} \
-Delasticsearch.port=${{ matrix.port }}
- name: Archive code coverage logs
uses: actions/upload-artifact@v3
if: false # UNOMI-746 Reactivate if necessary
with:
name: unomi-code-coverage-jdk11-${{ matrix.search-engine }}-${{ github.run_number }}
path: itests/target/site/jacoco
- name: Archive unomi logs
uses: actions/upload-artifact@v3
if: failure()
with:
name: unomi-log-jdk11-${{ matrix.search-engine }}-${{ github.run_number }}
path: |
itests/target/exam/**/data/log
itests/target/elasticsearch0/data
itests/target/elasticsearch0/logs
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: failure()
with:
report_paths: 'itests/target/failsafe-reports/TEST-*.xml'