From 331c952a1f1235ff224cec6913d79e9bcc3e7cac Mon Sep 17 00:00:00 2001 From: Anton Belodedenko <2033996+ab77@users.noreply.github.com> Date: Tue, 25 Jun 2024 12:33:11 -0700 Subject: [PATCH] check if AWS/EC2 instance is still running change-type: patch --- .github/workflows/tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cf70337..6385752 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -498,6 +498,9 @@ jobs: --compressed | jq -r '.update_pending')" =~ ^true$ ]]; do sleep "$(( ( RANDOM % ${{ env.RETRY }} ) + ${{ env.RETRY }} ))s" + + aws ec2 wait instance-running --instance-ids ${{ steps.balena-sut.outputs.instance_id }} || break + aws ec2 wait instance-status-ok --instance-ids ${{ steps.balena-sut.outputs.instance_id }} || break done # wait for services to start running @@ -900,6 +903,7 @@ jobs: --log-group-name open-balena-tests \ --log-stream-name-prefix "${cid}" | jq -r '.logStreams|length') -le 0 ]]; do echo '::info::waiting for logs...' + sleep $(((RANDOM%5) + 5))s done echo '::info::logs started'