Skip to content

Commit

Permalink
Add support to test against multiple versions of OpenSearch (#228) (#237
Browse files Browse the repository at this point in the history
)

* Expand test matrix to include multiple versions of OpenSearch

Signed-off-by: Vacha Shah <[email protected]>

* Add a compatibility matrix

Signed-off-by: Vacha Shah <[email protected]>

* Updating the github workflow matrix

Signed-off-by: Vacha Shah <[email protected]>
(cherry picked from commit f62a8cd)

Co-authored-by: Vacha Shah <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and VachaShah authored May 11, 2022
1 parent d9ea6dd commit 9c16403
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .ci/opensearch/Dockerfile.opensearch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG OPENSEARCH_VERSION
FROM opensearchproject/opensearch:$OPENSEARCH_VERSION
FROM opensearchproject/opensearch:${OPENSEARCH_VERSION}

ARG opensearch_path=/usr/share/opensearch
ARG opensearch_yml=$opensearch_path/config/opensearch.yml
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Integration for Compatibility

on: [push, pull_request]

jobs:
integration-test-compatibility:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
secured: ["true", "false"]
entry:
- { opensearch_version: 1.1.0 }
- { opensearch_version: 1.2.0 }
- { opensearch_version: 1.2.1 }
- { opensearch_version: 1.2.2 }
- { opensearch_version: 1.2.3 }
- { opensearch_version: 1.2.4 }
- { opensearch_version: 1.3.0 }
- { opensearch_version: 1.3.1 }

steps:
- uses: actions/checkout@v2

- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Runs OpenSearch cluster
run: |
export OPENSEARCH_VERSION=${{ matrix.entry.opensearch_version }}
export SECURE_INTEGRATION=${{ matrix.secured }}
make cluster.clean cluster.opensearch.build cluster.opensearch.start
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x

- name: Install
run: |
npm install
- name: Integration test without security
if: ${{ matrix.secured == 'false'}}
run: |
npm run test:integration:helpers
- name: Integration test with security
if: ${{ matrix.secured == 'true'}}
run: |
npm run test:integration:helpers-secure
- name: Stop the OpenSearch cluster
run: |
make cluster.opensearch.stop
18 changes: 18 additions & 0 deletions COMPATIBILITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- [Compatibility with OpenSearch](#compatibility-with-opensearch)

## Compatibility with OpenSearch

The below matrix shows the compatibility of the [`opensearch-js`](https://www.npmjs.com/package/@opensearch-project/opensearch) with versions of [`OpenSearch`](https://opensearch.org/downloads.html#opensearch).

| OpenSearch Version | Client Version |
| --- | --- |
| 1.0.0 | 1.0.0 |
| 1.0.1 | 1.0.0 |
| 1.1.0 | 1.1.0 |
| 1.2.0 | 1.1.0 |
| 1.2.1 | 1.1.0 |
| 1.2.2 | 1.1.0 |
| 1.2.3 | 1.1.0 |
| 1.2.4 | 1.1.0 |
| 1.3.0 | 1.1.0 |
| 1.3.1 | 1.1.0 |

0 comments on commit 9c16403

Please sign in to comment.