-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Theo Truong <[email protected]>
- Loading branch information
Showing
2 changed files
with
56 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,11 @@ | ||
version: '3' | ||
|
||
services: | ||
opensearch-cluster: | ||
image: opensearchproject/opensearch:${OPENSEARCH_VERSION} | ||
ports: | ||
- "9200:9200" | ||
- "9600:9600" | ||
environment: | ||
- "discovery.type=single-node" | ||
- "OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD}" |
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,45 @@ | ||
name: Test the OpenSearch spec against an OpenSearch cluster | ||
|
||
on: | ||
push: | ||
branches: [ '**' ] | ||
paths: | ||
- 'package*.json' | ||
- 'tsconfig.json' | ||
- 'tools/tester/**' | ||
- 'spec/**' | ||
pull_request: | ||
branches: [ '**' ] | ||
paths: | ||
- 'package*.json' | ||
- 'tsconfig.json' | ||
- 'tools/tester/**' | ||
- 'spec/**' | ||
|
||
jobs: | ||
test-opensearch-spec: | ||
runs-on: ubuntu-latest | ||
env: | ||
OPENSEARCH_VERSION: 2.12.0 | ||
OPENSEARCH_PASSWORD: myStrongPassword123! | ||
OPENSEARCH_URL: https://localhost:9200 | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Run OpenSearch Cluster | ||
working-directory: .github/opensearch-cluster | ||
run: | | ||
docker-compose up -d | ||
sleep 60 | ||
- name: Run Tests | ||
run: npm run test:spec |