From be0a2ad79f7c7e4b45a984c7bf4a302628bb72ac Mon Sep 17 00:00:00 2001 From: Raneet Debnath Date: Fri, 25 Nov 2022 11:24:56 +0530 Subject: [PATCH 1/7] CI: test launch devnet without hardcoded sleep time (pos-534) --- .github/workflows/ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5bb62a8bb..0497515e3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: - "master" - "qa" - "develop" + - "raneet10/pos-534" # RMV! pull_request: branches: - "**" @@ -142,11 +143,9 @@ jobs: bash docker-heimdall-start-all.sh bash docker-bor-setup.sh bash docker-bor-start-all.sh - sleep 120 && bash ganache-deployment-bor.sh - sleep 120 && bash ganache-deployment-sync.sh - sleep 120 - docker exec bor0 bash -c "bor attach /root/.bor/data/bor.ipc -exec 'admin.peers'" - docker exec bor0 bash -c "bor attach /root/.bor/data/bor.ipc -exec 'eth.blockNumber'" + timeout 2m bash bor/integration-tests/bor_health.sh + bash ganache-deployment-bor.sh + bash ganache-deployment-sync.sh - name: Run smoke tests run: | From c686660fe5de59a6265b641d7c902e7e18de7ec0 Mon Sep 17 00:00:00 2001 From: Raneet Debnath Date: Fri, 25 Nov 2022 14:05:58 +0530 Subject: [PATCH 2/7] CI: try using checked out bor path --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f4614bc31..c611b51d4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,7 +143,7 @@ jobs: bash docker-heimdall-start-all.sh bash docker-bor-setup.sh bash docker-bor-start-all.sh - cd code/ + cd - timeout 2m bash bor/integration-tests/bor_health.sh cd - bash ganache-deployment-bor.sh From 5df25bd360c8f9ad1945d9e1db868febed30445e Mon Sep 17 00:00:00 2001 From: Raneet Debnath Date: Fri, 25 Nov 2022 14:50:18 +0530 Subject: [PATCH 3/7] CI: fix missing ; --- integration-tests/bor_health.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/bor_health.sh b/integration-tests/bor_health.sh index 8e79197d00..020aa25063 100644 --- a/integration-tests/bor_health.sh +++ b/integration-tests/bor_health.sh @@ -6,7 +6,7 @@ do peers=$(docker exec bor0 bash -c "bor attach /root/.bor/data/bor.ipc -exec 'admin.peers'") block-$(docker exec bor0 bash -c "bor attach /root/.bor/data/bor.ipc -exec 'eth.blockNumber'") - if [[ -n "$peers" ]] && [[ -n "$block" ]] then + if [[ -n "$peers" ]] && [[ -n "$block" ]]; then break fi done \ No newline at end of file From e378b5febc6a9388643dc1cd79bf30b0af071665 Mon Sep 17 00:00:00 2001 From: Raneet Debnath Date: Fri, 25 Nov 2022 15:29:25 +0530 Subject: [PATCH 4/7] CI: fix assignment operator --- integration-tests/bor_health.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/bor_health.sh b/integration-tests/bor_health.sh index 020aa25063..0be1d8257f 100644 --- a/integration-tests/bor_health.sh +++ b/integration-tests/bor_health.sh @@ -4,7 +4,7 @@ set -e while true do peers=$(docker exec bor0 bash -c "bor attach /root/.bor/data/bor.ipc -exec 'admin.peers'") - block-$(docker exec bor0 bash -c "bor attach /root/.bor/data/bor.ipc -exec 'eth.blockNumber'") + block=$(docker exec bor0 bash -c "bor attach /root/.bor/data/bor.ipc -exec 'eth.blockNumber'") if [[ -n "$peers" ]] && [[ -n "$block" ]]; then break From 7cb597886a1ad5239ffcba1558267580ce3c6090 Mon Sep 17 00:00:00 2001 From: Raneet Debnath Date: Fri, 25 Nov 2022 16:20:43 +0530 Subject: [PATCH 5/7] CI: echo peers and block no. --- integration-tests/bor_health.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/integration-tests/bor_health.sh b/integration-tests/bor_health.sh index 0be1d8257f..a4ddb540cf 100644 --- a/integration-tests/bor_health.sh +++ b/integration-tests/bor_health.sh @@ -9,4 +9,7 @@ do if [[ -n "$peers" ]] && [[ -n "$block" ]]; then break fi -done \ No newline at end of file +done + +echo $peers +echo $block \ No newline at end of file From 9155cfc68bba6e779408f1315c611350d133fcaa Mon Sep 17 00:00:00 2001 From: Raneet Debnath Date: Fri, 25 Nov 2022 17:37:31 +0530 Subject: [PATCH 6/7] CI: cleanup --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c611b51d4a..e9e454c549 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,6 @@ on: - "master" - "qa" - "develop" - - "raneet10/pos-534" # RMV! pull_request: branches: - "**" From 806ed051be09056f52e6d433585987ef112e1b40 Mon Sep 17 00:00:00 2001 From: Raneet Debnath Date: Fri, 25 Nov 2022 17:50:58 +0530 Subject: [PATCH 7/7] minor chg: add new line --- integration-tests/bor_health.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/bor_health.sh b/integration-tests/bor_health.sh index a4ddb540cf..3288739f85 100644 --- a/integration-tests/bor_health.sh +++ b/integration-tests/bor_health.sh @@ -12,4 +12,4 @@ do done echo $peers -echo $block \ No newline at end of file +echo $block