-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix detox failure on jenkins #2078
Closed
abhishekjalan87
wants to merge
25
commits into
release/3.0.1
from
1999-fix-detox-failure-on-jenkins-fix
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
2f92653
:bug: Uncomment detox tests
Balanced02 2f6940e
:bug: Attempt using iPhone 15
Balanced02 b16b24a
:bug: Add script to select device
Balanced02 3c0a895
:bug: install jq from source
Balanced02 354f695
:bug: trying curl
Balanced02 b0e9955
:ninja: testing
Balanced02 552bca0
:ninja: testing
Balanced02 6f8af94
:ninja: testing
Balanced02 8313b4a
:ninja: testing
Balanced02 2851555
:arrow_back: revert
Balanced02 3a3e2e4
:arrow_right: install xcode tools
Balanced02 8f1d256
:arrow_left: revert
Balanced02 0ca185b
:arrow_right: Trying github action
Balanced02 4c7fe40
:arrow_right: Update node version
Balanced02 84368b8
:arrow_right: yarn run link
Balanced02 48d9704
:ninja: :fire: remove mobile protect
Balanced02 27e14e8
:ninja: :fire: copy test env file
Balanced02 60824e0
:arrow_back: Remove github actions
Balanced02 1b1a1c5
WIP Jenkinsfix
abhishekjalan87 7f5cc13
added xcrun simctl boot command in jenkinsfile
abhishekjalan87 a97f078
testing Shutdown/Boot Simulator error
abhishekjalan87 b79425b
Merge branch 'release/3.0.1' of https://github.com/LiskHQ/lisk-mobile…
Balanced02 a3d1831
Merge branch 'release/3.0.1' of https://github.com/LiskHQ/lisk-mobile…
Balanced02 f9a303b
:white_check_mark: Update certificate pinning check to testnet
Balanced02 ddc8feb
:white_check_mark: Update send token tests
Balanced02 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
echo "Starting the update_device.sh script..." | ||
|
||
# Get the list of devices | ||
echo "Fetching the list of devices..." | ||
devices=$(applesimutils --list) | ||
echo "Fetched the list of devices." | ||
|
||
# Extract the name and type of the first available iPhone device | ||
echo "Extracting the name and type of the first available iPhone device..." | ||
device_info=$(echo $devices | jq -r '.[] | select(.name | test("iPhone")) | {name: .name, type: .deviceTypeIdentifier} | @base64' | head -n 1) | ||
|
||
if [ -z "$device_info" ]; then | ||
echo "Error: No iPhone device found!" | ||
exit 1 | ||
fi | ||
|
||
device_name=$(echo $device_info | base64 --decode | jq -r '.name') | ||
device_type=$(echo $device_info | base64 --decode | jq -r '.type') | ||
echo "Selected Device Name: $device_name" | ||
echo "Selected Device Type: $device_type" | ||
|
||
# Create a backup of the .detoxrc.js file | ||
echo "Creating a backup of the .detoxrc.js file..." | ||
echo "Backup created as .detoxrc.js.bak." | ||
|
||
# Update .detoxrc.js with the new device name and type | ||
echo "Updating .detoxrc.js with the new device name and type..." | ||
sed -i.bak -e "s/type: 'iPhone 15 Pro'/type: '$device_name'/" -e "s/type: 'com.apple.CoreSimulator.SimDeviceType.iPhone-15-Pro'/type: '$device_type'/" .detoxrc.js | ||
echo ".detoxrc.js has been updated." | ||
|
||
echo "Script execution completed." |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might not need this file either, I created this cause I updated my system to latest and has iPhone 15, but @ClementeSerrano and most likely Jenkins might not have this device. So, this script is to ensure it picks the first device from the system to use. Let me know your thoughts pls.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree