From e006ae7579c73b9e1809290dc56e033cfb99c7d7 Mon Sep 17 00:00:00 2001 From: dblock Date: Thu, 18 Apr 2024 16:28:51 -0400 Subject: [PATCH] Use ./gradlew run. Signed-off-by: dblock --- .github/workflows/test_unreleased.yml | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test_unreleased.yml b/.github/workflows/test_unreleased.yml index ac681f6e..d598f2f0 100644 --- a/.github/workflows/test_unreleased.yml +++ b/.github/workflows/test_unreleased.yml @@ -28,31 +28,14 @@ jobs: 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 }} - - 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 }} + run: ./gradlew assemble - name: Run OpenSearch - working-directory: opensearch/distribution/archives/linux-tar/build/distributions + working-directory: opensearch run: | - tar xf opensearch-min-* - echo "discovery.type: single-node" >> ./opensearch-*/config/opensearch.yml - ./opensearch-*/bin/opensearch & + ./gradlew run & for attempt in {1..20}; do sleep 5; if curl -s localhost:9200; then echo '=====> ready'; break; fi; echo '=====> waiting...'; done - name: Checkout PHP Client