From 463c7d33bed5f62e18022885f01b8578bf9cdde2 Mon Sep 17 00:00:00 2001 From: Sai Medhini Reddy Maryada <117196660+saimedhi@users.noreply.github.com> Date: Tue, 29 Oct 2024 08:33:57 -0700 Subject: [PATCH] updated remote integ tests workflow (#438) Signed-off-by: saimedhi --- .../workflows/remote-integ-tests-workflow.yml | 43 ++++++++++++------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/.github/workflows/remote-integ-tests-workflow.yml b/.github/workflows/remote-integ-tests-workflow.yml index ced1d7ee..bbca9348 100644 --- a/.github/workflows/remote-integ-tests-workflow.yml +++ b/.github/workflows/remote-integ-tests-workflow.yml @@ -72,37 +72,48 @@ jobs: node-version: ${{ steps.tool-versions.outputs.node_version }} registry-url: 'https://registry.npmjs.org' - - name: Setup Opensearch Dashboards + - name: Install correct yarn version for OpenSearch Dashboards + id: setup-yarn run: | npm uninstall -g yarn - echo "Installing yarn ${{ steps.tool-versions.outputs.yarn_version }}" - npm i -g yarn@${{ steps.tool-versions.outputs.yarn_version }} - yarn cache clean - yarn add sha.js - working-directory: OpenSearch-Dashboards - shell: bash + echo "Installing yarn ${{ steps.versions_step.outputs.yarn_version }}" + npm i -g yarn@${{ steps.versions_step.outputs.yarn_version }} - - name: Bootstrap Opensearch Dashboards + - name: Yarn Cache + uses: actions/cache@v4 + with: + path: | + OpenSearch-Dashboards/**/target + OpenSearch-Dashboards/**/node_modules + key: ${{ runner.OS }}-build-${{ hashFiles('OpenSearch-Dashboards/**/yarn.lock') }} + restore-keys: | + ${{ runner.OS }}-build- + + - name: Bootstrap OpenSearch Dashboards run: | + cd OpenSearch-Dashboards yarn osd bootstrap --single-version=loose - working-directory: OpenSearch-Dashboards/plugins/dashboards-flow-framework + - name: Compile OpenSearch Dashboards + run: | + cd OpenSearch-Dashboards + node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers=10 --verbose + - name: Run Opensearch Dashboards with FF Installed run: | nohup yarn start --no-base-path --no-watch --server.host="0.0.0.0" | tee dashboard.log & - sleep 60 working-directory: OpenSearch-Dashboards - - name : Check If OpenSearch Dashboards Is Ready + - name: Check If OpenSearch Dashboards Is Ready if: ${{ runner.os == 'Linux' }} run: | - if timeout 600 grep -q "bundles compiled successfully after" <(tail -n0 -f dashboard.log); then - echo "OpenSearch Dashboards compiled successfully." + cd ./OpenSearch-Dashboards + if timeout 60 grep -q "http server running" <(tail -n +1 -f dashboard.log); then + echo "OpenSearch Dashboards started successfully." else - echo "Timeout for 600 seconds reached. OpenSearch Dashboards did not finish compiling." + echo "Timeout of 60 seconds reached. OpenSearch Dashboards did not start successfully." exit 1 - fi - working-directory: OpenSearch-Dashboards + fi& - name: Show OpenSearch Dashboards Logs if: always()