2d6ae74211
* Updated dependencies. Signed-off-by: dblock <dblock@amazon.com> * Lock setuptools at 71.1.0. Newer version seems to cause UserWarning: Unknown distribution option: 'test_suite'. Signed-off-by: dblock <dblock@amazon.com> * Updated opensearch-py APIs to reflect opensearch-api-specification@9d3bc34. Signed-off-by: dblock <dblock@amazon.com> * Do not test against flaky 2.0. Signed-off-by: dblock <dblock@amazon.com> * Reduce test matrix and add 2.16. Signed-off-by: dblock <dblock@amazon.com> * Fix missing spaces in generated descriptions. Signed-off-by: dblock <dblock@amazon.com> * Removed 2.2.1. Signed-off-by: dblock <dblock@amazon.com> --------- Signed-off-by: dblock <dblock@amazon.com>
74 lines
2.4 KiB
YAML
74 lines
2.4 KiB
YAML
name: Integration with Unreleased OpenSearch
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
opensearch_ref: [ '1.x', '2.x', 'main' ]
|
|
|
|
steps:
|
|
- name: Checkout OpenSearch
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: opensearch-project/opensearch
|
|
ref: ${{ matrix.opensearch_ref }}
|
|
path: opensearch
|
|
|
|
- name: Get OpenSearch branch top
|
|
id: get-key
|
|
working-directory: opensearch
|
|
run: echo key=`git log -1 --format='%H'` >> $GITHUB_OUTPUT
|
|
|
|
- name: Restore cached build
|
|
id: cache-restore
|
|
uses: actions/cache/restore@v3
|
|
with:
|
|
path: opensearch/distribution/archives/linux-tar/build/distributions
|
|
key: ${{ steps.get-key.outputs.key }}
|
|
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
|
java-version: '11'
|
|
|
|
- name: Assemble OpenSearch
|
|
if: steps.cache-restore.outputs.cache-hit != 'true'
|
|
working-directory: opensearch
|
|
run: ./gradlew :distribution:archives:linux-tar:assemble
|
|
|
|
- name: Save cached build
|
|
if: steps.cache-restore.outputs.cache-hit != 'true'
|
|
uses: actions/cache/save@v3
|
|
with:
|
|
path: opensearch/distribution/archives/linux-tar/build/distributions
|
|
key: ${{ steps.get-key.outputs.key }}
|
|
|
|
- name: Run OpenSearch
|
|
working-directory: opensearch/distribution/archives/linux-tar/build/distributions
|
|
run: |
|
|
tar xf opensearch-min-*
|
|
./opensearch-*/bin/opensearch -E path.repo=/tmp &
|
|
for attempt in {1..20}; do sleep 5; if curl -s localhost:9200; then echo '=====> ready'; break; fi; echo '=====> waiting...'; done
|
|
|
|
- name: Checkout Python Client
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: opensearch-py
|
|
|
|
- name: Run Integration Test
|
|
env:
|
|
OPENSEARCH_URL: http://localhost:9200
|
|
TEST_TYPE: server
|
|
OPENSEARCH_VERSION: SNAPSHOT
|
|
run: |
|
|
mkdir -p junit
|
|
python -m pip install -U --no-cache-dir --disable-pip-version-check pip
|
|
python -m pip install --no-cache-dir --disable-pip-version-check -r dev-requirements.txt
|
|
python -m pip install -e .
|
|
python setup.py test
|
|
working-directory: opensearch-py
|