Skip to content

Commit a9d4126

Browse files
committed
ci: update search engine configurations for Elasticsearch and OpenSearch in workflow
1 parent 7764c70 commit a9d4126

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

.github/workflows/magento-compatibility.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,25 @@ jobs:
4141
- 3306:3306
4242
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
4343

44-
search:
45-
image: ${{ matrix.search-image }}
44+
elasticsearch:
45+
image: elasticsearch:7.17.0
46+
if: ${{ matrix.search-engine == 'elasticsearch' }}
47+
ports:
48+
- 9200:9200
49+
env:
50+
discovery.type: single-node
51+
ES_JAVA_OPTS: -Xms512m -Xmx512m
52+
options: --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10
53+
54+
opensearch:
55+
image: opensearchproject/opensearch:2.11.0
56+
if: ${{ matrix.search-engine == 'opensearch' }}
4657
ports:
4758
- 9200:9200
4859
env:
4960
discovery.type: single-node
5061
plugins.security.disabled: true
5162
OPENSEARCH_JAVA_OPTS: -Xms512m -Xmx512m
52-
ES_JAVA_OPTS: -Xms512m -Xmx512m
5363
options: --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10
5464

5565
steps:
@@ -79,7 +89,7 @@ jobs:
7989
8090
- name: Check Search Engine status
8191
run: |
82-
curl -s http://localhost:9200/_cluster/health
92+
curl -s http://localhost:9200/_cluster/health || echo "Search service health check failed"
8393
8494
- name: Install Magento
8595
working-directory: magento2

0 commit comments

Comments
 (0)