-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support to test against unreleased OpenSearch (#232)
Signed-off-by: Vacha Shah <[email protected]>
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Integration with Unreleased OpenSearch | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
entry: | ||
- { opensearch_ref: '1.x' } | ||
steps: | ||
- name: Checkout OpenSearch | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: opensearch-project/OpenSearch | ||
ref: ${{ matrix.entry.opensearch_ref }} | ||
path: opensearch | ||
|
||
- name: Assemble OpenSearch | ||
run: | | ||
cd opensearch | ||
./gradlew assemble | ||
# This step runs the docker image generated during gradle assemble in OpenSearch. It is tagged as opensearch:test. | ||
# Reference: https://github.com/opensearch-project/OpenSearch/blob/2.0/distribution/docker/build.gradle#L190 | ||
- name: Run Docker Image | ||
run: | | ||
docker run -p 9200:9200 -p 9600:9600 -d -e "discovery.type=single-node" -e "bootstrap.memory_lock=true" opensearch:test | ||
sleep 90 | ||
- name: Checkout Javascript Client | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Install | ||
run: | | ||
npm install | ||
- name: Integration test | ||
run: | | ||
npm run test:integration:helpers |