From de43b75b764cf56d2cb6361672a7b024917bb794 Mon Sep 17 00:00:00 2001 From: Tyler Hackett Date: Fri, 11 Oct 2024 13:30:20 -0700 Subject: [PATCH 1/6] log ip address --- packages/core-mobile/scripts/bitrise/detox/iosInternalE2e.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/core-mobile/scripts/bitrise/detox/iosInternalE2e.sh b/packages/core-mobile/scripts/bitrise/detox/iosInternalE2e.sh index 439ec9be44..a8c8dc720d 100755 --- a/packages/core-mobile/scripts/bitrise/detox/iosInternalE2e.sh +++ b/packages/core-mobile/scripts/bitrise/detox/iosInternalE2e.sh @@ -3,6 +3,10 @@ # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully set -o pipefail +echo "Here is the public IP address of the machine running the tests" + +curl -s http://ipecho.net/plain; echo + npm rebuild detox ./node_modules/.bin/detox test --configuration ios.internal.release.smoke.ci --retries 1 --max-workers 3; test_result=$? From 66550590530358c85d86fb9b6b3a5544ee93c484 Mon Sep 17 00:00:00 2001 From: Tyler Hackett Date: Wed, 16 Oct 2024 12:50:41 -0700 Subject: [PATCH 2/6] try nested env var --- .../scripts/bitrise/detox/createAndroidTestRun.sh | 6 +++--- .../core-mobile/scripts/bitrise/detox/createIosTestRun.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/core-mobile/scripts/bitrise/detox/createAndroidTestRun.sh b/packages/core-mobile/scripts/bitrise/detox/createAndroidTestRun.sh index 4c40c7d645..fed1dad9e8 100755 --- a/packages/core-mobile/scripts/bitrise/detox/createAndroidTestRun.sh +++ b/packages/core-mobile/scripts/bitrise/detox/createAndroidTestRun.sh @@ -28,9 +28,9 @@ TEST_RUN_DETAILS=$(curl -H "Content-Type: application/json" \ -X POST "https://avalabs.testrail.net/index.php?/api/v2/add_run/3") # Extract the test run id from the details and store in TESTRAIL_RUN_ID -TESTRAIL_RUN_ID=$(jq -r ".id" <<< "$TEST_RUN_DETAILS") +ANDROID_TESTRAIL_RUN_ID=$(jq -r ".id" <<< "$TEST_RUN_DETAILS") -echo "Test run id: $TESTRAIL_RUN_ID" +echo "Test run id: $ANDROID_TESTRAIL_RUN_ID" -envman add --key TESTRAIL_RUN_ID --value "$TESTRAIL_RUN_ID" +envman add --key TESTRAIL_RUN_ID --value "$ANDROID_TESTRAIL_RUN_ID" diff --git a/packages/core-mobile/scripts/bitrise/detox/createIosTestRun.sh b/packages/core-mobile/scripts/bitrise/detox/createIosTestRun.sh index da1a34c49e..d3f6b03221 100755 --- a/packages/core-mobile/scripts/bitrise/detox/createIosTestRun.sh +++ b/packages/core-mobile/scripts/bitrise/detox/createIosTestRun.sh @@ -31,8 +31,8 @@ TEST_RUN_DETAILS=$(curl -H "Content-Type: application/json" \ -X POST "https://avalabs.testrail.net/index.php?/api/v2/add_run/3") # Extract the test run id from the details and store in TESTRAIL_RUN_ID -TESTRAIL_RUN_ID=$(jq -r ".id" <<< "$TEST_RUN_DETAILS") +IOS_TESTRAIL_RUN_ID=$(jq -r ".id" <<< "$TEST_RUN_DETAILS") -echo "Test run id: $TESTRAIL_RUN_ID" +echo "Test run id: $IOS_TESTRAIL_RUN_ID" -envman add --key TESTRAIL_RUN_ID --value "$TESTRAIL_RUN_ID" \ No newline at end of file +envman add --key TESTRAIL_RUN_ID --value "$IOS_TESTRAIL_RUN_ID" \ No newline at end of file From 4ac70fb572aacccd3643734486bcc61e0164fa68 Mon Sep 17 00:00:00 2001 From: Tyler Hackett Date: Wed, 16 Oct 2024 13:06:41 -0700 Subject: [PATCH 3/6] add nested env var --- bitrise.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index aa43b1163d..9e20103145 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -410,7 +410,7 @@ workflows: - buttons: | View App|${BITRISE_APP_URL} View Build|${BITRISE_BUILD_URL} - View Test Run|https://avalabs.testrail.io/index.php?/runs/view/${TESTRAIL_RUN_ID}&group_by=cases:section_id&group_order=asc + View Test Run|https://avalabs.testrail.io/index.php?/runs/view/${${PLATFORM}_${TESTRAIL_RUN_ID}}&group_by=cases:section_id&group_order=asc - webhook_url: $SLACK_TEST_RESULT_WEBHOOK_URL _set-version: steps: @@ -1046,7 +1046,7 @@ workflows: inputs: - variables: |- IS_REGRESSION_RUN=$IS_REGRESSION_RUN - TESTRAIL_RUN_ID=$TESTRAIL_RUN_ID + IOS_TESTRAIL_RUN_ID=$TESTRAIL_RUN_ID - script-runner@0: title: Detox inputs: @@ -1097,4 +1097,4 @@ workflows: inputs: - variables: |- IS_REGRESSION_RUN=$IS_REGRESSION_RUN - TESTRAIL_RUN_ID=$TESTRAIL_RUN_ID \ No newline at end of file + IOS_TESTRAIL_RUN_ID=$TESTRAIL_RUN_ID \ No newline at end of file From 23871622071bf9ba4b4e37a60c854acd64db93b5 Mon Sep 17 00:00:00 2001 From: Tyler Hackett Date: Wed, 16 Oct 2024 14:04:12 -0700 Subject: [PATCH 4/6] fix ios regression config --- bitrise.yml | 4 ++-- packages/core-mobile/detox.config.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 9e20103145..ce422b4f9c 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -410,7 +410,7 @@ workflows: - buttons: | View App|${BITRISE_APP_URL} View Build|${BITRISE_BUILD_URL} - View Test Run|https://avalabs.testrail.io/index.php?/runs/view/${${PLATFORM}_${TESTRAIL_RUN_ID}}&group_by=cases:section_id&group_order=asc + View Test Run|https://avalabs.testrail.io/index.php?/runs/view/${TESTRAIL_RUN_ID}&group_by=cases:section_id&group_order=asc - webhook_url: $SLACK_TEST_RESULT_WEBHOOK_URL _set-version: steps: @@ -577,7 +577,7 @@ workflows: - PLATFORM: Android opts: is_expand: false - - ANDROID_BUILD_VARIANT: externale2e + - ANDROID_BUILD_VARIANT: externalE2e opts: is_expand: false - APP_TITLE: Core Mobile diff --git a/packages/core-mobile/detox.config.js b/packages/core-mobile/detox.config.js index e4cd596c71..b33e19e818 100644 --- a/packages/core-mobile/detox.config.js +++ b/packages/core-mobile/detox.config.js @@ -277,7 +277,7 @@ module.exports = { testRunner: { $0: 'jest', args: { - config: './e2e/configs/smokeTestConfigReuseState.json' + config: './e2e/configs/regressionConfig.json' } } }, From 965b5bce0a3d9969ef027065c7f1080dfa3943c9 Mon Sep 17 00:00:00 2001 From: Tyler Hackett Date: Wed, 16 Oct 2024 14:09:14 -0700 Subject: [PATCH 5/6] revert run id changes --- bitrise.yml | 2 -- .../scripts/bitrise/detox/createAndroidTestRun.sh | 6 +++--- .../core-mobile/scripts/bitrise/detox/createIosTestRun.sh | 6 +++--- .../core-mobile/scripts/bitrise/detox/iosInternalE2e.sh | 4 ---- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index ce422b4f9c..4c1f8b4677 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -1046,7 +1046,6 @@ workflows: inputs: - variables: |- IS_REGRESSION_RUN=$IS_REGRESSION_RUN - IOS_TESTRAIL_RUN_ID=$TESTRAIL_RUN_ID - script-runner@0: title: Detox inputs: @@ -1097,4 +1096,3 @@ workflows: inputs: - variables: |- IS_REGRESSION_RUN=$IS_REGRESSION_RUN - IOS_TESTRAIL_RUN_ID=$TESTRAIL_RUN_ID \ No newline at end of file diff --git a/packages/core-mobile/scripts/bitrise/detox/createAndroidTestRun.sh b/packages/core-mobile/scripts/bitrise/detox/createAndroidTestRun.sh index fed1dad9e8..4c40c7d645 100755 --- a/packages/core-mobile/scripts/bitrise/detox/createAndroidTestRun.sh +++ b/packages/core-mobile/scripts/bitrise/detox/createAndroidTestRun.sh @@ -28,9 +28,9 @@ TEST_RUN_DETAILS=$(curl -H "Content-Type: application/json" \ -X POST "https://avalabs.testrail.net/index.php?/api/v2/add_run/3") # Extract the test run id from the details and store in TESTRAIL_RUN_ID -ANDROID_TESTRAIL_RUN_ID=$(jq -r ".id" <<< "$TEST_RUN_DETAILS") +TESTRAIL_RUN_ID=$(jq -r ".id" <<< "$TEST_RUN_DETAILS") -echo "Test run id: $ANDROID_TESTRAIL_RUN_ID" +echo "Test run id: $TESTRAIL_RUN_ID" -envman add --key TESTRAIL_RUN_ID --value "$ANDROID_TESTRAIL_RUN_ID" +envman add --key TESTRAIL_RUN_ID --value "$TESTRAIL_RUN_ID" diff --git a/packages/core-mobile/scripts/bitrise/detox/createIosTestRun.sh b/packages/core-mobile/scripts/bitrise/detox/createIosTestRun.sh index d3f6b03221..da1a34c49e 100755 --- a/packages/core-mobile/scripts/bitrise/detox/createIosTestRun.sh +++ b/packages/core-mobile/scripts/bitrise/detox/createIosTestRun.sh @@ -31,8 +31,8 @@ TEST_RUN_DETAILS=$(curl -H "Content-Type: application/json" \ -X POST "https://avalabs.testrail.net/index.php?/api/v2/add_run/3") # Extract the test run id from the details and store in TESTRAIL_RUN_ID -IOS_TESTRAIL_RUN_ID=$(jq -r ".id" <<< "$TEST_RUN_DETAILS") +TESTRAIL_RUN_ID=$(jq -r ".id" <<< "$TEST_RUN_DETAILS") -echo "Test run id: $IOS_TESTRAIL_RUN_ID" +echo "Test run id: $TESTRAIL_RUN_ID" -envman add --key TESTRAIL_RUN_ID --value "$IOS_TESTRAIL_RUN_ID" \ No newline at end of file +envman add --key TESTRAIL_RUN_ID --value "$TESTRAIL_RUN_ID" \ No newline at end of file diff --git a/packages/core-mobile/scripts/bitrise/detox/iosInternalE2e.sh b/packages/core-mobile/scripts/bitrise/detox/iosInternalE2e.sh index a8c8dc720d..439ec9be44 100755 --- a/packages/core-mobile/scripts/bitrise/detox/iosInternalE2e.sh +++ b/packages/core-mobile/scripts/bitrise/detox/iosInternalE2e.sh @@ -3,10 +3,6 @@ # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully set -o pipefail -echo "Here is the public IP address of the machine running the tests" - -curl -s http://ipecho.net/plain; echo - npm rebuild detox ./node_modules/.bin/detox test --configuration ios.internal.release.smoke.ci --retries 1 --max-workers 3; test_result=$? From 0119f1cd2372f3c4ae69797dffe3a4143fab62b5 Mon Sep 17 00:00:00 2001 From: Tyler Hackett Date: Wed, 16 Oct 2024 14:11:51 -0700 Subject: [PATCH 6/6] add testrail run id back --- bitrise.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bitrise.yml b/bitrise.yml index 4c1f8b4677..061f5b3366 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -1046,6 +1046,7 @@ workflows: inputs: - variables: |- IS_REGRESSION_RUN=$IS_REGRESSION_RUN + TESTRAIL_RUN_ID=$TESTRAIL_RUN_ID - script-runner@0: title: Detox inputs: @@ -1096,3 +1097,4 @@ workflows: inputs: - variables: |- IS_REGRESSION_RUN=$IS_REGRESSION_RUN + TESTRAIL_RUN_ID=$TESTRAIL_RUN_ID