Skip to content

Commit

Permalink
# setting up workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Theo Truong <[email protected]>
  • Loading branch information
nhtruong committed May 29, 2024
1 parent 6dcd9dd commit 18f7c15
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/opensearch-cluster/docker-compose.yml
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}"
45 changes: 45 additions & 0 deletions .github/workflows/test-spec.yaml
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

0 comments on commit 18f7c15

Please sign in to comment.