Skip to content

Commit

Permalink
Display device status
Browse files Browse the repository at this point in the history
  • Loading branch information
anhappdev committed Dec 17, 2024
1 parent 6190c5d commit 5c0e09a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/scripts/browserstack-app-automate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,19 @@ check_build_status() {
local build_id=$1
local response=$(curl -s -u "$CREDENTIALS" -X GET "$STATUS_URL/$build_id")
local status=$(echo "$response" | jq -r '.status')

echo "$(date +'%Y-%m-%d %H:%M:%S') Build Status: $status"

# Display device status
echo "$response" | jq -r '
.devices[] |
"Device: " + .device +
", OS Version: " + .os_version +
", Duration: " + (.sessions[0].duration | tostring) + "s" +
", Status: " + (.sessions[0].status)
'

# Display build status
if [[ "$status" == "passed" ]]; then
echo "Build completed successfully!"
exit 0
Expand Down

0 comments on commit 5c0e09a

Please sign in to comment.