From a277bc4117ccb3216d0595d313a3c6eee7d80a85 Mon Sep 17 00:00:00 2001 From: Ryan Liang Date: Fri, 15 Dec 2023 10:34:41 -0800 Subject: [PATCH] [Forwardport main] Minor changes for cypress workflow Signed-off-by: Ryan Liang --- .../workflows/integration-tests-workflow.yml | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/.github/workflows/integration-tests-workflow.yml b/.github/workflows/integration-tests-workflow.yml index 17ee358bf3..2ee8a85ecb 100644 --- a/.github/workflows/integration-tests-workflow.yml +++ b/.github/workflows/integration-tests-workflow.yml @@ -1,8 +1,7 @@ name: Dashboards observability plugin E2E test -on: - schedule: - - cron: '0 0 * * *' - workflow_dispatch: + +on: [pull_request, push] + env: PLUGIN_NAME: dashboards-observability OPENSEARCH_DASHBOARDS_VERSION: 'main' @@ -11,6 +10,7 @@ env: jobs: tests: + name: Run test group of ${{ matrix.testgroups }} env: # Prevents extra Cypress installation progress messages CI: 1 @@ -25,7 +25,6 @@ jobs: java: [11] testgroups: [ app_analytics_test, - notebooks_test, datasources_test, event_analytics_test, integrations_test, @@ -130,18 +129,12 @@ jobs: if: ${{ runner.os == 'Linux' }} run: | cd ./OpenSearch-Dashboards - echo "Start checking OpenSearch Dashboards." - for i in {1..60}; do - if grep -q "bundles compiled successfully after" "dashboard.log"; then - echo "OpenSearch Dashboards compiled successfully." - break - fi - if [ $i -eq 60 ]; then - echo "Timeout for 600 seconds reached. OpenSearch Dashboards did not finish compiling." - exit 1 - fi - sleep 10 - done + if timeout 600 grep -q "bundles compiled successfully after" <(tail -n0 -f dashboard.log); then + echo "OpenSearch Dashboards compiled successfully." + else + echo "Timeout for 600 seconds reached. OpenSearch Dashboards did not finish compiling." + exit 1 + fi - name: Install Cypress run: |