Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
sandipndev committed Oct 12, 2023
1 parent 0f1b705 commit 7742a25
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
18 changes: 17 additions & 1 deletion android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,22 @@ platform :android do
browserstack_access_key: ENV["BROWSERSTACK_ACCESS_KEY"],
file_path: ENV["GRADLE_APK_OUTPUT_PATH"]
)
sh("GALOY_TEST_TOKENS=$GALOY_TEST_TOKENS && GALOY_TOKEN_2=$GALOY_TOKEN_2 && MAILSLURP_API_KEY=$MAILSLURP_API_KEY && yarn test:browserstack:android")

max_retries = 3
retries = 0

begin
sh("GALOY_TOKEN_2=$GALOY_TOKEN_2 && MAILSLURP_API_KEY=$MAILSLURP_API_KEY && yarn test:browserstack:android")
rescue => e
retries += 1
if retries < max_retries
UI.message("Error: #{e}. Retrying... (Attempt #{retries}/#{max_retries})")
retry
else
UI.error("Failed after #{max_retries} attempts. Exiting.")
raise e
end
end
end

end
17 changes: 16 additions & 1 deletion ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,21 @@ platform :ios do
browserstack_username: ENV["BROWSERSTACK_USER"],
browserstack_access_key: ENV["BROWSERSTACK_ACCESS_KEY"],
)
sh("GALOY_TEST_TOKENS=$GALOY_TEST_TOKENS && GALOY_TOKEN_2=$GALOY_TOKEN_2 && MAILSLURP_API_KEY=$MAILSLURP_API_KEY && yarn test:browserstack:ios")

max_retries = 3
retries = 0

begin
sh("GALOY_TOKEN_2=$GALOY_TOKEN_2 && MAILSLURP_API_KEY=$MAILSLURP_API_KEY && yarn test:browserstack:ios")
rescue => e
retries += 1
if retries < max_retries
UI.message("Error: #{e}. Retrying... (Attempt #{retries}/#{max_retries})")
retry
else
UI.error("Failed after #{max_retries} attempts. Exiting.")
raise e
end
end
end
end

0 comments on commit 7742a25

Please sign in to comment.