Skip to content

Commit 3330988

Browse files
kohinoor98r1walz
authored andcommitted
adding wait for status check and then proceed
Signed-off-by: kohinoor98 <[email protected]>
1 parent 8a385b8 commit 3330988

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

.github/workflows/cypress-workflow.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,13 @@ jobs:
7070
run: |
7171
cd OpenSearch-Dashboards
7272
yarn start --no-base-path --no-watch --server.host="0.0.0.0" &
73-
sleep 420
74-
# in main branch, OSD server requires more time to bundle and bootstrap
75-
# timeout 300 bash -c 'while [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
76-
# for now just chrome, use matrix to do all browsers later
73+
timeout 600 bash -c 'until [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:5601/api/status)" == "200" ]] && [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" == "green" ]]; do echo "Waiting for OpenSearch-Dashboards server to be ready..."; sleep 5; done'
7774
- name: Cypress tests
7875
uses: cypress-io/github-action@v2
7976
with:
8077
working-directory: OpenSearch-Dashboards/plugins/index-management-dashboards-plugin
8178
command: yarn run cypress run
82-
wait-on: 'http://localhost:5601'
79+
wait-on: 'http://localhost:9200, http://localhost:5601'
8380
browser: chrome
8481
# Screenshots are only captured on failure, will change this once we do visual regression tests
8582
- uses: actions/upload-artifact@v1

0 commit comments

Comments
 (0)