Skip to content

Commit b5244d5

Browse files
committed
Test on multiple ElasticSearch and OpenSearch versions
1 parent 29aacac commit b5244d5

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/test.yml

+23-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ jobs:
66

77
strategy:
88
matrix:
9+
search:
10+
[
11+
elasticsearch-7.6.0,
12+
elasticsearch-8.2.0,
13+
opensearch-2.6.0,
14+
opensearch-2.13.0,
15+
]
916
include:
1017
- elixir: 1.16.x
1118
otp: 26.x
@@ -22,17 +29,31 @@ jobs:
2229
steps:
2330
- uses: actions/checkout@v4
2431

32+
- id: search
33+
run: |
34+
version=$(echo ${{ matrix.search }} | cut -d- -f2)
35+
service=$(echo ${{ matrix.search }} | cut -d- -f1)
36+
echo "::set-output name=version::$version"
37+
echo "::set-output name=service::$service"
38+
2539
- name: Configure sysctl limits
2640
run: |
2741
sudo swapoff -a
2842
sudo sysctl -w vm.swappiness=1
2943
sudo sysctl -w fs.file-max=262144
3044
sudo sysctl -w vm.max_map_count=262144
3145
32-
- name: Runs Elasticsearch
46+
- name: Run Elasticsearch
3347
uses: elastic/elastic-github-actions/elasticsearch@master
3448
with:
35-
stack-version: 7.6.0
49+
stack-version: ${{ steps.search.outputs.version }}
50+
if: ${{ steps.search.outputs.service == 'elasticsearch' }}
51+
52+
- name: Run OpenSearch
53+
uses: ankane/setup-opensearch@v1
54+
with:
55+
opensearch-version: ${{ steps.search.outputs.version }}
56+
if: ${{ steps.search.outputs.service == 'opensearch' }}
3657

3758
- uses: erlef/setup-beam@v1
3859
id: setup-elixir

0 commit comments

Comments
 (0)