Skip to content

Commit

Permalink
Fix: integration tests with unreleased version of OpenSearch.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Aug 19, 2024
1 parent fde2c47 commit b3fb790
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/test-integration-unreleased.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ jobs:
strategy:
fail-fast: false
matrix:
opensearch_ref: [ '1.x', '2.x', 'main' ]
entry:
- { branch: "1.x", java-version: "11" }
- { branch: "2.x", java-version: "17" }
- { branch: "main", java-version: "17" }
steps:
- name: Checkout OpenSearch
uses: actions/checkout@v4
with:
repository: opensearch-project/OpenSearch
ref: ${{ matrix.entry.opensearch_ref }}
ref: ${{ matrix.entry.branch }}
path: opensearch

- name: Get OpenSearch branch top
Expand All @@ -35,6 +38,11 @@ jobs:
path: opensearch/distribution/archives/linux-tar/build/distributions
key: ${{ steps.get-key.outputs.key }}

- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ matrix.entry.java-version }}

- name: Assemble OpenSearch
if: steps.cache-restore.outputs.cache-hit != 'true'
working-directory: opensearch
Expand All @@ -53,26 +61,26 @@ jobs:
tar xf opensearch-min-*
./opensearch-*/bin/opensearch -Epath.repo=/usr/share/opensearch/mnt &
for attempt in {1..20}; do sleep 5; if curl -s localhost:9200; then echo '=====> ready'; break; fi; echo '=====> waiting...'; done
- name: Checkout Go Client
uses: actions/checkout@v4
with:
path: go-client

- name: Setup Go
uses: actions/setup-go@v5
with: { go-version-file: 'go-client/go.mod' }
with: { go-version-file: "go-client/go.mod" }

- name: Integration test
working-directory: go-client
run: make test-integ-core race=true
env:
OPENSEARCH_GO_SKIP_JSON_COMPARE: true

- name: Save server logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: opensearch-logs-${{ matrix.opensearch_ref }}-go-${{ matrix.python-version }}
name: opensearch-logs-${{ matrix.entry.branch }}
path: |
opensearch/distribution/archives/linux-tar/build/distributions/**/logs/*

0 comments on commit b3fb790

Please sign in to comment.