From bd08d3fed0a36c67f6adda0593e5d0edcf85993a Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 12:34:38 +0200 Subject: [PATCH 01/28] Update Gutenberg ref --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 1ee3cc7615..34645f6798 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 1ee3cc7615773e50077bffb078904cdbe1efbe04 +Subproject commit 34645f6798e1ef4ff02271ed8e5a11d0ced89da2 From 95d77170f90db32210517b9262815eefb6bdd927 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 12:39:16 +0200 Subject: [PATCH 02/28] Try Appium iOS build --- .buildkite/commands/build-ios.sh | 25 +- .buildkite/pipeline.yml | 490 +++++++++++++++---------------- 2 files changed, 258 insertions(+), 257 deletions(-) diff --git a/.buildkite/commands/build-ios.sh b/.buildkite/commands/build-ios.sh index 81a9696c21..e65a2f53fc 100755 --- a/.buildkite/commands/build-ios.sh +++ b/.buildkite/commands/build-ios.sh @@ -20,33 +20,34 @@ popd echo '--- :ios: Set env var for iOS E2E testing' set -x export TEST_RN_PLATFORM=ios -export TEST_ENV=sauce +export TEST_ENV=local # We must use a simulator that's available on the selected Xcode version # otherwsie Xcode fallbacks to "generic destination" which requires provision # profiles to built the Demo app. export RN_EDITOR_E2E_IOS_DESTINATION="platform=iOS Simulator,name=iPhone 15" set +x +echo "--- :react: Prepare tests setup" +npm run core test:e2e:setup + echo '--- :react: Build iOS bundle for E2E testing' npm run test:e2e:bundle:ios echo '--- :react: Build iOS app for E2E testing' npm run core test:e2e:build-app:ios -echo '--- :compression: Prepare artifact for SauceLabs upload' +echo '--- :react: Build WDA for E2E testing' +npm run core test:e2e:build-wda + +echo '--- :compression: Prepare artifacts' WORK_DIR=$(pwd) \ - && pushd ./gutenberg/packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator \ - && zip -r "$WORK_DIR/gutenberg/packages/react-native-editor/ios/GutenbergDemo.app.zip" GutenbergDemo.app \ + && pushd ./gutenberg/packages/react-native-editor/ios/build/WDA \ + && zip -r "$WORK_DIR/gutenberg/packages/react-native-editor/ios/WDA.zip" ./* \ && popd -echo '--- :saucelabs: Upload app artifact to SauceLabs' -SAUCE_FILENAME=${BUILDKITE_BRANCH//[\/]/-} -curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" \ - --location \ - --request POST 'https://api.us-west-1.saucelabs.com/v1/storage/upload' \ - --form 'payload=@"./gutenberg/packages/react-native-editor/ios/GutenbergDemo.app.zip"' \ - --form "name=Gutenberg-$SAUCE_FILENAME.app.zip" \ - --form 'description="Gutenberg"' +echo "--- :arrow_up: Upload Build" +upload_artifact "./gutenberg/packages/react-native-editor/ios/GutenbergDemo.app.zip" +upload_artifact "./gutenberg/packages/react-native-editor/ios/WDA.zip" echo "--- :cocoapods: Save Pods cache if necessary" pushd "$PODS_PATH" diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 03ac4deae4..18d5a4bc45 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -24,123 +24,123 @@ x-common-params: build.branch != 'trunk' && build.branch !~ /^release.*/ && build.branch !~ /^dependabot\/submodules.*/ steps: - - label: Lint - key: lint - plugins: - - *ci_toolkit_plugin - - *git-partial-clone-plugin - - *nvm_plugin - agents: - queue: android - command: .buildkite/commands/lint.sh - notify: - - github_commit_status: - context: Lint + # - label: Lint + # key: lint + # plugins: + # - *ci_toolkit_plugin + # - *git-partial-clone-plugin + # - *nvm_plugin + # agents: + # queue: android + # command: .buildkite/commands/lint.sh + # notify: + # - github_commit_status: + # context: Lint - - label: Android Unit Tests - key: android-unit-tests - plugins: - - *git-partial-clone-plugin - - *nvm_plugin - - *ci_toolkit_plugin - agents: - queue: android - command: .buildkite/commands/unit-tests-android.sh - env: - JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml - artifact_paths: - - ./logs/*.log - - ./reports/test-results/*.xml - notify: - - github_commit_status: - context: Android Unit Tests + # - label: Android Unit Tests + # key: android-unit-tests + # plugins: + # - *git-partial-clone-plugin + # - *nvm_plugin + # - *ci_toolkit_plugin + # agents: + # queue: android + # command: .buildkite/commands/unit-tests-android.sh + # env: + # JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml + # artifact_paths: + # - ./logs/*.log + # - ./reports/test-results/*.xml + # notify: + # - github_commit_status: + # context: Android Unit Tests - - label: iOS Unit Tests - key: ios-unit-tests - plugins: - - *nvm_plugin - - *ci_toolkit_plugin - - *git-partial-clone-plugin - agents: - queue: android - command: .buildkite/commands/unit-tests-ios.sh - env: - JEST_JUNIT_OUTPUT_FILE: reports/test-results/ios-test-results.xml - artifact_paths: - - ./logs/*.log - - ./reports/test-results/*.xml - notify: - - github_commit_status: - context: iOS Unit Tests + # - label: iOS Unit Tests + # key: ios-unit-tests + # plugins: + # - *nvm_plugin + # - *ci_toolkit_plugin + # - *git-partial-clone-plugin + # agents: + # queue: android + # command: .buildkite/commands/unit-tests-ios.sh + # env: + # JEST_JUNIT_OUTPUT_FILE: reports/test-results/ios-test-results.xml + # artifact_paths: + # - ./logs/*.log + # - ./reports/test-results/*.xml + # notify: + # - github_commit_status: + # context: iOS Unit Tests - - label: React Native Editor Android Tests - key: android-unit-tests-editor - command: | - .buildkite/commands/install-node-dependencies.sh --prefix gutenberg --ignore-scripts - echo "--- :android: Run tests" - cd gutenberg/packages/react-native-editor/android - ./gradlew testDebug - plugins: - - *ci_toolkit_plugin - - *git-partial-clone-plugin - - *nvm_plugin - agents: - queue: android + # - label: React Native Editor Android Tests + # key: android-unit-tests-editor + # command: | + # .buildkite/commands/install-node-dependencies.sh --prefix gutenberg --ignore-scripts + # echo "--- :android: Run tests" + # cd gutenberg/packages/react-native-editor/android + # ./gradlew testDebug + # plugins: + # - *ci_toolkit_plugin + # - *git-partial-clone-plugin + # - *nvm_plugin + # agents: + # queue: android - - label: React Native Bridge Android Tests - key: android-unit-tests-bridge - command: | - .buildkite/commands/install-node-dependencies.sh --prefix gutenberg --ignore-scripts - echo "--- :android: Run tests" - cd gutenberg/packages/react-native-bridge/android - ./gradlew test - plugins: - - *ci_toolkit_plugin - - *git-partial-clone-plugin - - *nvm_plugin - agents: - queue: android + # - label: React Native Bridge Android Tests + # key: android-unit-tests-bridge + # command: | + # .buildkite/commands/install-node-dependencies.sh --prefix gutenberg --ignore-scripts + # echo "--- :android: Run tests" + # cd gutenberg/packages/react-native-bridge/android + # ./gradlew test + # plugins: + # - *ci_toolkit_plugin + # - *git-partial-clone-plugin + # - *nvm_plugin + # agents: + # queue: android - - label: Build JS Bundles - key: js-bundles - plugins: - - *ci_toolkit_plugin - - *nvm_plugin - command: .buildkite/commands/build-bundles.sh - agents: - queue: mac - env: *xcode_agent_env + # - label: Build JS Bundles + # key: js-bundles + # plugins: + # - *ci_toolkit_plugin + # - *nvm_plugin + # command: .buildkite/commands/build-bundles.sh + # agents: + # queue: mac + # env: *xcode_agent_env - - label: "Build Android RN Aztec & Publish to S3" - key: "publish-react-native-aztec-android" - plugins: - - *git-partial-clone-plugin - - *publish-android-artifacts-docker-container - command: .buildkite/commands/publish-react-native-aztec-android-artifacts.sh + # - label: "Build Android RN Aztec & Publish to S3" + # key: "publish-react-native-aztec-android" + # plugins: + # - *git-partial-clone-plugin + # - *publish-android-artifacts-docker-container + # command: .buildkite/commands/publish-react-native-aztec-android-artifacts.sh - - label: "Build Android RN Bridge & Publish to S3" - depends_on: - - "js-bundles" - - "publish-react-native-aztec-android" - plugins: - - *git-partial-clone-plugin - - *publish-android-artifacts-docker-container - command: .buildkite/commands/publish-react-native-bridge-android-artifacts.sh + # - label: "Build Android RN Bridge & Publish to S3" + # depends_on: + # - "js-bundles" + # - "publish-react-native-aztec-android" + # plugins: + # - *git-partial-clone-plugin + # - *publish-android-artifacts-docker-container + # command: .buildkite/commands/publish-react-native-bridge-android-artifacts.sh - - label: Build iOS RN XCFramework & Publish to S3 - depends_on: js-bundles - command: .buildkite/commands/publish-react-native-ios-artifacts.sh - artifact_paths: - - ios-xcframework/build/xcframeworks/*.tar.gz - plugins: - - *ci_toolkit_plugin - - *nvm_plugin - agents: - queue: mac - env: *xcode_agent_env + # - label: Build iOS RN XCFramework & Publish to S3 + # depends_on: js-bundles + # command: .buildkite/commands/publish-react-native-ios-artifacts.sh + # artifact_paths: + # - ios-xcframework/build/xcframeworks/*.tar.gz + # plugins: + # - *ci_toolkit_plugin + # - *nvm_plugin + # agents: + # queue: mac + # env: *xcode_agent_env - - label: iOS Build and Sauce Labs - key: ios-build-and-saucelabs + - label: iOS Build + key: ios-build command: .buildkite/commands/build-ios.sh plugins: - *ci_toolkit_plugin @@ -151,149 +151,149 @@ steps: queue: mac env: *xcode_agent_env - - label: Test iOS on Device – Canary Pages - depends_on: ios-build-and-saucelabs - command: .buildkite/commands/test-ios.sh --canary - plugins: - - *ci_toolkit_plugin - - *nvm_plugin - artifact_paths: - - reports/test-results/ios-test-results.xml - agents: - queue: mac - env: *xcode_agent_env - notify: - - github_commit_status: - context: Test iOS on Device - Canaries + # - label: Test iOS on Device – Canary Pages + # depends_on: ios-build-and-saucelabs + # command: .buildkite/commands/test-ios.sh --canary + # plugins: + # - *ci_toolkit_plugin + # - *nvm_plugin + # artifact_paths: + # - reports/test-results/ios-test-results.xml + # agents: + # queue: mac + # env: *xcode_agent_env + # notify: + # - github_commit_status: + # context: Test iOS on Device - Canaries - - label: Android Build and Sauce Labs - key: android-build-and-saucelabs - command: .buildkite/commands/build-android.sh - plugins: - - *ci_toolkit_plugin - - *git-partial-clone-plugin - - *nvm_plugin - agents: - queue: android + # - label: Android Build and Sauce Labs + # key: android-build-and-saucelabs + # command: .buildkite/commands/build-android.sh + # plugins: + # - *ci_toolkit_plugin + # - *git-partial-clone-plugin + # - *nvm_plugin + # agents: + # queue: android - - label: Test Android on Device – Canary Pages - depends_on: android-build-and-saucelabs - command: .buildkite/commands/test-android.sh --canary - plugins: - - *ci_toolkit_plugin - - *nvm_plugin - - *git-partial-clone-plugin - agents: - queue: android - artifact_paths: - - reports/test-results/android-test-results.xml - env: - JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml - notify: - - github_commit_status: - context: Test Android on Device - Canaries + # - label: Test Android on Device – Canary Pages + # depends_on: android-build-and-saucelabs + # command: .buildkite/commands/test-android.sh --canary + # plugins: + # - *ci_toolkit_plugin + # - *nvm_plugin + # - *git-partial-clone-plugin + # agents: + # queue: android + # artifact_paths: + # - reports/test-results/android-test-results.xml + # env: + # JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml + # notify: + # - github_commit_status: + # context: Test Android on Device - Canaries - - block: "Full UI Tests" - # Show only in branches that run the quick UI tests suite, to optionally run the full suite - if: *is_branch_for_quick_ui_tests - key: run-full-ui-test - prompt: "Run full UI tests suites?" - depends_on: ios-build-and-saucelabs + # - block: "Full UI Tests" + # # Show only in branches that run the quick UI tests suite, to optionally run the full suite + # if: *is_branch_for_quick_ui_tests + # key: run-full-ui-test + # prompt: "Run full UI tests suites?" + # depends_on: ios-build-and-saucelabs - - label: Test iOS on Device – Full iPhone - # The quick UI tests suite version depends on the block step being unblocked - if: *is_branch_for_quick_ui_tests - depends_on: - - ios-build-and-saucelabs - - run-full-ui-test - command: .buildkite/commands/test-ios.sh - plugins: - - *ci_toolkit_plugin - - *nvm_plugin - artifact_paths: - - reports/test-results/ios-test-results.xml - agents: - queue: mac - env: *xcode_agent_env + # - label: Test iOS on Device – Full iPhone + # # The quick UI tests suite version depends on the block step being unblocked + # if: *is_branch_for_quick_ui_tests + # depends_on: + # - ios-build-and-saucelabs + # - run-full-ui-test + # command: .buildkite/commands/test-ios.sh + # plugins: + # - *ci_toolkit_plugin + # - *nvm_plugin + # artifact_paths: + # - reports/test-results/ios-test-results.xml + # agents: + # queue: mac + # env: *xcode_agent_env - # Same step as above, but will always run in trunk, release/, and dependabot/submodules branches - - label: Test iOS on Device – Full iPhone - # The full UI tests suite version depends only on the ios-build step, meaning it has no manual step that triggers it - if: *is_branch_for_full_ui_tests - depends_on: - - ios-build-and-saucelabs - command: .buildkite/commands/test-ios.sh - plugins: - - *ci_toolkit_plugin - - *nvm_plugin - artifact_paths: - - reports/test-results/ios-test-results.xml - agents: - queue: mac - env: *xcode_agent_env + # # Same step as above, but will always run in trunk, release/, and dependabot/submodules branches + # - label: Test iOS on Device – Full iPhone + # # The full UI tests suite version depends only on the ios-build step, meaning it has no manual step that triggers it + # if: *is_branch_for_full_ui_tests + # depends_on: + # - ios-build-and-saucelabs + # command: .buildkite/commands/test-ios.sh + # plugins: + # - *ci_toolkit_plugin + # - *nvm_plugin + # artifact_paths: + # - reports/test-results/ios-test-results.xml + # agents: + # queue: mac + # env: *xcode_agent_env - - label: Test iOS on Device – Full iPad - # The quick UI tests suite version depends on the block step being unblocked - if: *is_branch_for_quick_ui_tests - depends_on: - - ios-build-and-saucelabs - - run-full-ui-test - command: .buildkite/commands/test-ios.sh --ipad - plugins: - - *ci_toolkit_plugin - - *nvm_plugin - artifact_paths: - - reports/test-results/ios-test-results.xml - agents: - queue: mac - env: *xcode_agent_env + # - label: Test iOS on Device – Full iPad + # # The quick UI tests suite version depends on the block step being unblocked + # if: *is_branch_for_quick_ui_tests + # depends_on: + # - ios-build-and-saucelabs + # - run-full-ui-test + # command: .buildkite/commands/test-ios.sh --ipad + # plugins: + # - *ci_toolkit_plugin + # - *nvm_plugin + # artifact_paths: + # - reports/test-results/ios-test-results.xml + # agents: + # queue: mac + # env: *xcode_agent_env - - label: Test iOS on Device – Full iPad - # The full UI tests suite version depends only on the ios-build step, meaning it has no manual step that triggers it - if: *is_branch_for_full_ui_tests - depends_on: - - ios-build-and-saucelabs - command: .buildkite/commands/test-ios.sh --ipad - plugins: - - *ci_toolkit_plugin - - *nvm_plugin - artifact_paths: - - reports/test-results/ios-test-results.xml - agents: - queue: mac - env: *xcode_agent_env + # - label: Test iOS on Device – Full iPad + # # The full UI tests suite version depends only on the ios-build step, meaning it has no manual step that triggers it + # if: *is_branch_for_full_ui_tests + # depends_on: + # - ios-build-and-saucelabs + # command: .buildkite/commands/test-ios.sh --ipad + # plugins: + # - *ci_toolkit_plugin + # - *nvm_plugin + # artifact_paths: + # - reports/test-results/ios-test-results.xml + # agents: + # queue: mac + # env: *xcode_agent_env - - label: Test Android on Device – Full - # The quick UI tests suite version depends on the block step being unblocked - if: *is_branch_for_quick_ui_tests - depends_on: - - android-build-and-saucelabs - - run-full-ui-test - command: .buildkite/commands/test-android.sh - plugins: - - *ci_toolkit_plugin - - *nvm_plugin - - *git-partial-clone-plugin - agents: - queue: android - artifact_paths: - - reports/test-results/android-test-results.xml - env: - JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml + # - label: Test Android on Device – Full + # # The quick UI tests suite version depends on the block step being unblocked + # if: *is_branch_for_quick_ui_tests + # depends_on: + # - android-build-and-saucelabs + # - run-full-ui-test + # command: .buildkite/commands/test-android.sh + # plugins: + # - *ci_toolkit_plugin + # - *nvm_plugin + # - *git-partial-clone-plugin + # agents: + # queue: android + # artifact_paths: + # - reports/test-results/android-test-results.xml + # env: + # JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml - - label: Test Android on Device – Full - # The full UI tests suite version depends only on the android-build-and-suacelabs step, meaning it has no manual step that triggers it - if: *is_branch_for_full_ui_tests - depends_on: - - android-build-and-saucelabs - command: .buildkite/commands/test-android.sh - plugins: - - *ci_toolkit_plugin - - *nvm_plugin - - *git-partial-clone-plugin - agents: - queue: android - artifact_paths: - - reports/test-results/android-test-results.xml - env: - JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml + # - label: Test Android on Device – Full + # # The full UI tests suite version depends only on the android-build-and-suacelabs step, meaning it has no manual step that triggers it + # if: *is_branch_for_full_ui_tests + # depends_on: + # - android-build-and-saucelabs + # command: .buildkite/commands/test-android.sh + # plugins: + # - *ci_toolkit_plugin + # - *nvm_plugin + # - *git-partial-clone-plugin + # agents: + # queue: android + # artifact_paths: + # - reports/test-results/android-test-results.xml + # env: + # JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml From 149aa8ccda29946ec02651d8b7104d0225adff43 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 12:49:18 +0200 Subject: [PATCH 03/28] Update Gutenberg ref --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 34645f6798..6d6f33361f 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 34645f6798e1ef4ff02271ed8e5a11d0ced89da2 +Subproject commit 6d6f33361f39c81db239597908c3cf3488e2c6b1 From fb1f6e8c8099d6c4d62f94d55a3d20bb2f71f67d Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 13:48:16 +0200 Subject: [PATCH 04/28] Update Gutenberg ref --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 6d6f33361f..648570e4eb 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 6d6f33361f39c81db239597908c3cf3488e2c6b1 +Subproject commit 648570e4eb4b1a3b6c3944fb8afa44f70deec51b From 53316065145d1d733cd00691ec732880bb2f853d Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 14:05:24 +0200 Subject: [PATCH 05/28] Update Gutenberg ref --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 648570e4eb..3538186cc6 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 648570e4eb4b1a3b6c3944fb8afa44f70deec51b +Subproject commit 3538186cc6773725e1554ec0bceedef1d5a0c60b From 87e03a943a00c5a320d0cb772bf6487dce4ad73c Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 14:19:14 +0200 Subject: [PATCH 06/28] Update Gutenberg ref --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 3538186cc6..53ac871fea 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 3538186cc6773725e1554ec0bceedef1d5a0c60b +Subproject commit 53ac871feab142859d18af73c861df11488d221a From d3020489e2e3eab3fc3fa3714d14815e442e347b Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 14:41:40 +0200 Subject: [PATCH 07/28] Fix artifacts path --- .buildkite/commands/build-ios.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.buildkite/commands/build-ios.sh b/.buildkite/commands/build-ios.sh index e65a2f53fc..30f32bb167 100755 --- a/.buildkite/commands/build-ios.sh +++ b/.buildkite/commands/build-ios.sh @@ -40,10 +40,18 @@ echo '--- :react: Build WDA for E2E testing' npm run core test:e2e:build-wda echo '--- :compression: Prepare artifacts' -WORK_DIR=$(pwd) \ - && pushd ./gutenberg/packages/react-native-editor/ios/build/WDA \ - && zip -r "$WORK_DIR/gutenberg/packages/react-native-editor/ios/WDA.zip" ./* \ - && popd +# Set the working directory +WORK_DIR=$(pwd) + +# Compress the GutenbergDemo.app +pushd ./gutenberg/packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator +zip -r "$WORK_DIR/gutenberg/packages/react-native-editor/ios/GutenbergDemo.app.zip" GutenbergDemo.app +popd + +# Compress the WDA directory +pushd ./gutenberg/packages/react-native-editor/ios/build/WDA +zip -r "$WORK_DIR/gutenberg/packages/react-native-editor/ios/WDA.zip" ./* +popd echo "--- :arrow_up: Upload Build" upload_artifact "./gutenberg/packages/react-native-editor/ios/GutenbergDemo.app.zip" From 6fedc9d15e30051379c794c46dff2ebad54188ac Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 14:59:09 +0200 Subject: [PATCH 08/28] Try canary iOS tests --- .buildkite/commands/test-ios.sh | 41 ++++++++++++++++++++++++--------- .buildkite/pipeline.yml | 29 ++++++++++++----------- 2 files changed, 45 insertions(+), 25 deletions(-) diff --git a/.buildkite/commands/test-ios.sh b/.buildkite/commands/test-ios.sh index faa905564b..f553607813 100755 --- a/.buildkite/commands/test-ios.sh +++ b/.buildkite/commands/test-ios.sh @@ -1,5 +1,9 @@ #!/bin/bash -eu +CONFIG_FILE="$(pwd)/gutenberg/packages/react-native-editor/__device-tests__/helpers/device-config.json" +DEVICE_NAME=$(jq -r '.ios.local.deviceName' "$CONFIG_FILE") +DEVICE_TABLET_NAME=$(jq -r '.ios.local.deviceTabletName' "$CONFIG_FILE") + MODE="iphone" INPUT="${1-}" while [ "$INPUT" != "" ]; do @@ -19,6 +23,29 @@ while [ "$INPUT" != "" ]; do INPUT="${1-}" done +if [ "$MODE" == 'canary' ]; then + SECTION='--- :react: Test iOS Canary Pages' + TESTS_CMD='device-tests-canary' +elif [ "$MODE" == "ipad" ]; then + SECTION='--- :react: Test iOS iPad' + DEVICE_NAME=$DEVICE_TABLET_NAME + TESTS_CMD='device-tests-ipad' +else + SECTION='--- :react: Test iOS iPhone' + TESTS_CMD='device-tests' +fi + +echo "--- :apple_logo: Start booting up simulator" +xcrun simctl boot "$DEVICE_NAME" & + +echo "--- 📦 Downloading Build Artifacts" +export IOS_APP_PATH=./gutenberg/packages/react-native-editor/ios/GutenbergDemo.app.zip +download_artifact "GutenbergDemo.app.zip" "$IOS_APP_PATH" + +export WDA_PATH=./gutenberg/packages/react-native-editor/ios/build/WDA +download_artifact "WDA.zip" "$WDA_PATH/WDA.zip" +unzip "$WDA_PATH/WDA.zip" -d "$WDA_PATH" + # First, restore the caches, if any .buildkite/commands/install-node-dependencies.sh --restore-only # Second, set up the gutenberg-mobile dependencies without building the i18n cache (--ignore-scripts) @@ -32,23 +59,15 @@ npm ci --prefer-offline --no-progress --no-audit --prefix gutenberg echo '--- :ios: Set env var for iOS E2E testing' set -x export TEST_RN_PLATFORM=ios -export TEST_ENV=sauce +export TEST_ENV=local export JEST_JUNIT_OUTPUT_FILE="reports/test-results/ios-test-results.xml" # This is a relic of the CircleCI setup. # It should be removed once the migration to Buildkite is completed. export CIRCLE_BRANCH=${BUILDKITE_BRANCH} set +x -if [ "$MODE" == 'canary' ]; then - SECTION='--- :saucelabs: Test iOS Canary Pages' - TESTS_CMD='device-tests-canary' -elif [ "$MODE" == "ipad" ]; then - SECTION='--- :saucelabs: Test iOS iPad' - TESTS_CMD='device-tests-ipad' -else - SECTION='--- :saucelabs: Test iOS iPhone' - TESTS_CMD='device-tests' -fi +echo "--- :react: Prepare tests setup" +npm run core test:e2e:setup set +e echo "$SECTION" diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 18d5a4bc45..1ff9674432 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -151,20 +151,21 @@ steps: queue: mac env: *xcode_agent_env - # - label: Test iOS on Device – Canary Pages - # depends_on: ios-build-and-saucelabs - # command: .buildkite/commands/test-ios.sh --canary - # plugins: - # - *ci_toolkit_plugin - # - *nvm_plugin - # artifact_paths: - # - reports/test-results/ios-test-results.xml - # agents: - # queue: mac - # env: *xcode_agent_env - # notify: - # - github_commit_status: - # context: Test iOS on Device - Canaries + - label: Test iOS on Device – Canary Pages + depends_on: ios-build + command: .buildkite/commands/test-ios.sh --canary + plugins: + - *ci_toolkit_plugin + - *nvm_plugin + artifact_paths: + - reports/test-results/ios-test-results.xml + - ios-screen-recordings/* + agents: + queue: mac + env: *xcode_agent_env + notify: + - github_commit_status: + context: Test iOS on Device - Canaries # - label: Android Build and Sauce Labs # key: android-build-and-saucelabs From 6296816c2b87920734389b8bff68dea80e18d531 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 15:24:15 +0200 Subject: [PATCH 09/28] Add test e2e comand --- bin/test-e2e.sh | 30 ++++++++++++++++++++++++++++++ package.json | 10 +++++----- 2 files changed, 35 insertions(+), 5 deletions(-) create mode 100755 bin/test-e2e.sh diff --git a/bin/test-e2e.sh b/bin/test-e2e.sh new file mode 100755 index 0000000000..1052b684b4 --- /dev/null +++ b/bin/test-e2e.sh @@ -0,0 +1,30 @@ +#!/bin/bash -e + +set -o pipefail + +# Using the ':' operator with ':=' to check if a variable is set. +# If the variable is unset or null, the value after ':=' is assigned to it. +: ${IOS_APP_PATH:='./gutenberg/packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app'} +: ${WDA_PATH:='./gutenberg/packages/react-native-editor/ios/build/WDA'} +: ${ANDROID_APP_PATH:='./gutenberg/packages/react-native-editor/android/app/build/outputs/apk/debug/app-debug.apk'} + +export IOS_APP_PATH +export WDA_PATH +export ANDROID_APP_PATH + +export APPIUM_HOME=~/.appium +export NODE_ENV=test + +if [ "$TEST_RN_PLATFORM" == "android" ]; then + MAX_WORKERS=2 +else + MAX_WORKERS=1 +fi + +# Check for debug mode +if [ "$1" == "--debug" ]; then + shift # Remove first argument + node $NODE_DEBUG_OPTION --inspect-brk node_modules/jest/bin/jest --runInBand --detectOpenHandles --verbose --config jest_ui.config.js "$@" +else + jest --config ./jest_ui.config.js --maxWorkers $MAX_WORKERS --forceExit "$@" +fi \ No newline at end of file diff --git a/package.json b/package.json index 2b68cb33e4..00bb1cced1 100644 --- a/package.json +++ b/package.json @@ -82,11 +82,11 @@ "test": "cross-env NODE_ENV=test jest --config ./jest.config.js", "test:update": "cross-env NODE_ENV=test jest --config ./jest.config.js --updateSnapshot", "test:debug": "cross-env NODE_ENV=test node --inspect-brk node_modules/.bin/jest --runInBand --verbose --config jest.config.js", - "device-tests": "cross-env NODE_ENV=test jest --maxWorkers=2 --testPathIgnorePatterns='canary|gutenberg-editor-rendering|ipad' --config jest_ui.config.js", - "device-tests-canary": "cross-env NODE_ENV=test jest --maxWorkers=2 --testPathPattern=@canary --config jest_ui.config.js", - "device-tests-ipad": "cross-env NODE_ENV=test IPAD=true jest --maxWorkers=2 --testPathPattern=@ipad --config jest_ui.config.js", - "device-tests:local": "APPIUM_HOME=~/.appium IOS_APP_PATH='./gutenberg/packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app' WDA_PATH='./gutenberg/packages/react-native-editor/ios/build/WDA' ANDROID_APP_PATH='./gutenberg/packages/react-native-editor/android/app/build/outputs/apk/debug/app-debug.apk' NODE_ENV=test jest --maxWorkers=2 --detectOpenHandles --config jest_ui.config.js", - "device-tests:debug": "IOS_APP_PATH='./gutenberg/packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app' WDA_PATH='./gutenberg/packages/react-native-editor/ios/build/WDA' ANDROID_APP_PATH='./gutenberg/packages/react-native-editor/android/app/build/outputs/apk/debug/app-debug.apk' cross-env NODE_ENV=test node $NODE_DEBUG_OPTION --inspect-brk node_modules/jest/bin/jest --runInBand --detectOpenHandles --verbose --config jest_ui.config.js", + "device-tests": "./bin/test-e2e.sh --testPathIgnorePatterns='canary|gutenberg-editor-rendering|ipad'", + "device-tests-canary": "./bin/test-e2e.sh --testPathPattern=@canary", + "device-tests-ipad": "IPAD=true ./bin/test-e2e.sh --testPathPattern=@ipad", + "device-tests:local": "./bin/test-e2e.sh --detectOpenHandles", + "device-tests:debug": "./bin/test-e2e.sh --debug --runInBand --detectOpenHandles --verbose", "test:e2e:bundle:android": "npm run test:e2e:bundle:android:text && npm run test:e2e:bundle:android:bytecode", "test:e2e:bundle:android:text": "mkdir -p gutenberg/packages/react-native-editor/android/app/src/main/assets && npm run rn-bundle -- -- -- -- --config ../../../metro.config.js --reset-cache --platform android --dev false --minify false --entry-file index.js --bundle-output ./android/app/src/main/assets/index.android.text.bundle --assets-dest ./android/app/src/main/res", "test:e2e:bundle:android:bytecode": "./gutenberg/node_modules/react-native/sdks/hermesc/`node -e \"const platform=require('os').platform();console.log(platform === 'darwin' ? 'osx-bin' : (platform === 'linux' ? 'linux64-bin' : (platform === 'win32' ? 'win64-bin' : 'unsupported-os')));\"`/hermesc -emit-binary -O -out gutenberg/packages/react-native-editor/android/app/src/main/assets/index.android.bundle gutenberg/packages/react-native-editor/android/app/src/main/assets/index.android.text.bundle -output-source-map", From 957c5f0f8061403e5657244b552b151be70ef813 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 15:46:10 +0200 Subject: [PATCH 10/28] Update Gutenberg ref --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 53ac871fea..aefeb7013a 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 53ac871feab142859d18af73c861df11488d221a +Subproject commit aefeb7013af4cd1c4b4eaaa519762b547a994fff From cf321e5b46580ca5de9d9810cbbc1eb212132b5c Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 15:57:35 +0200 Subject: [PATCH 11/28] Update Gutenberg ref --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index aefeb7013a..3ff315f23c 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit aefeb7013af4cd1c4b4eaaa519762b547a994fff +Subproject commit 3ff315f23cca701ceff55cf2b66232476bd8058e From e27c3c8e0dc9dc876761b398f82634c8e889036c Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 16:48:07 +0200 Subject: [PATCH 12/28] Update Gutenberg ref --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 3ff315f23c..6b42d7ea8f 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 3ff315f23cca701ceff55cf2b66232476bd8058e +Subproject commit 6b42d7ea8f0242b2300597927ba59e45a4cfac9e From edfdfe01affe26d48a23a7784d4eb0b8603c5ee2 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 17:11:39 +0200 Subject: [PATCH 13/28] Fix icon --- .buildkite/commands/test-ios.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/commands/test-ios.sh b/.buildkite/commands/test-ios.sh index f553607813..b0eb824e4a 100755 --- a/.buildkite/commands/test-ios.sh +++ b/.buildkite/commands/test-ios.sh @@ -35,7 +35,7 @@ else TESTS_CMD='device-tests' fi -echo "--- :apple_logo: Start booting up simulator" +echo "--- :ios: Start booting up simulator" xcrun simctl boot "$DEVICE_NAME" & echo "--- 📦 Downloading Build Artifacts" From d799178becfb7702e16e37036b411c56e9f466b5 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 17:17:53 +0200 Subject: [PATCH 14/28] Add ignore scripts for test ios --- .buildkite/commands/test-ios.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/commands/test-ios.sh b/.buildkite/commands/test-ios.sh index b0eb824e4a..f4d5267e66 100755 --- a/.buildkite/commands/test-ios.sh +++ b/.buildkite/commands/test-ios.sh @@ -54,7 +54,7 @@ echo "--- :npm: Install Node dependencies" npm ci --prefer-offline --no-progress --no-audit --ignore-scripts # Finally, set up the gutenberg submodule dependencies, bypassed by the step above. # We need them because some E2E logic lives in gutenberg. -npm ci --prefer-offline --no-progress --no-audit --prefix gutenberg +npm ci --prefer-offline --no-progress --no-audit --prefix gutenberg --ignore-scripts echo '--- :ios: Set env var for iOS E2E testing' set -x From d4805fb1d73bc89e3845e9f949094960f0f04231 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 17:45:42 +0200 Subject: [PATCH 15/28] Add build app cache --- .buildkite/commands/build-ios.sh | 51 ++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/.buildkite/commands/build-ios.sh b/.buildkite/commands/build-ios.sh index 30f32bb167..aacb28aaa5 100755 --- a/.buildkite/commands/build-ios.sh +++ b/.buildkite/commands/build-ios.sh @@ -2,9 +2,17 @@ PLATFORM=$(uname -s) ARCHITECTURE=$(uname -m) -PODFILE_HASH=$(hash_file gutenberg/packages/react-native-editor/ios/Podfile.lock) + +# Base Paths +REACT_NATIVE_EDITOR_PATH="gutenberg/packages/react-native-editor/ios" +BUILD_PATH="$REACT_NATIVE_EDITOR_PATH/build" +PRODUCTS_PATH="$BUILD_PATH/GutenbergDemo/Build/Products/Release-iphonesimulator" +APP_PATH="$PRODUCTS_PATH/GutenbergDemo.app" +PODS_PATH="$REACT_NATIVE_EDITOR_PATH" + +# Pods +PODFILE_HASH=$(hash_file "$REACT_NATIVE_EDITOR_PATH/Podfile.lock") PODFILE_CACHEKEY="$BUILDKITE_PIPELINE_SLUG-pods-$PLATFORM-$ARCHITECTURE-$PODFILE_HASH" -PODS_PATH="gutenberg/packages/react-native-editor/ios" PODS_FOLDER="Pods" echo '--- :desktop_computer: Clear up some disk space' @@ -12,6 +20,24 @@ rm -rfv ~/.Trash/15.1.xip .buildkite/commands/install-node-dependencies.sh +# Generate build key +find package-lock.json \ + gutenberg/packages/react-native-editor/ios \ + gutenberg/packages/react-native-aztec/ios \ + gutenberg/packages/react-native-bridge/ios \ + -type f -print0 | sort -z | xargs -0 shasum | tee ios-checksums.txt +APP_BUILD_HASH=$(hash_file ios-checksums.txt) +APP_BUILD_CACHEKEY="$BUILDKITE_PIPELINE_SLUG-ios-app-$PLATFORM-$ARCHITECTURE-$APP_BUILD_HASH" + +echo "--- :ios: Restore App build if present" +if [ -d "$PRODUCTS_PATH" ]; then + pushd "$PRODUCTS_PATH" + restore_cache "$APP_BUILD_CACHEKEY" + popd +else + echo "Error: Directory $PRODUCTS_PATH does not exist." +fi + echo "--- :cocoapods: Restore Pods if present" pushd "$PODS_PATH" restore_cache "$PODFILE_CACHEKEY" @@ -34,7 +60,7 @@ echo '--- :react: Build iOS bundle for E2E testing' npm run test:e2e:bundle:ios echo '--- :react: Build iOS app for E2E testing' -npm run core test:e2e:build-app:ios +test -e "$APP_PATH/GutenbergDemo" || npm run core test:e2e:build-app:ios echo '--- :react: Build WDA for E2E testing' npm run core test:e2e:build-wda @@ -44,20 +70,27 @@ echo '--- :compression: Prepare artifacts' WORK_DIR=$(pwd) # Compress the GutenbergDemo.app -pushd ./gutenberg/packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator -zip -r "$WORK_DIR/gutenberg/packages/react-native-editor/ios/GutenbergDemo.app.zip" GutenbergDemo.app +pushd "$PRODUCTS_PATH" +zip -r "$WORK_DIR/$REACT_NATIVE_EDITOR_PATH/GutenbergDemo.app.zip" GutenbergDemo.app popd # Compress the WDA directory -pushd ./gutenberg/packages/react-native-editor/ios/build/WDA -zip -r "$WORK_DIR/gutenberg/packages/react-native-editor/ios/WDA.zip" ./* +pushd "$BUILD_PATH/WDA" +zip -r "$WORK_DIR/$REACT_NATIVE_EDITOR_PATH/WDA.zip" ./* popd echo "--- :arrow_up: Upload Build" -upload_artifact "./gutenberg/packages/react-native-editor/ios/GutenbergDemo.app.zip" -upload_artifact "./gutenberg/packages/react-native-editor/ios/WDA.zip" +upload_artifact "$REACT_NATIVE_EDITOR_PATH/GutenbergDemo.app.zip" +upload_artifact "$REACT_NATIVE_EDITOR_PATH/WDA.zip" echo "--- :cocoapods: Save Pods cache if necessary" pushd "$PODS_PATH" save_cache "$PODS_FOLDER" "$PODFILE_CACHEKEY" popd + +# Save app build +rm "$APP_PATH/main.jsbundle" +rm -rf "$APP_PATH/assets" +pushd "$PRODUCTS_PATH" +save_cache "GutenbergDemo.app" "$APP_BUILD_CACHEKEY" +popd \ No newline at end of file From b9baa7f42b89e42ed534129f5685f903d51434eb Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 17:58:55 +0200 Subject: [PATCH 16/28] Fix iOS app cache --- .buildkite/commands/build-ios.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.buildkite/commands/build-ios.sh b/.buildkite/commands/build-ios.sh index aacb28aaa5..e3a8dd399a 100755 --- a/.buildkite/commands/build-ios.sh +++ b/.buildkite/commands/build-ios.sh @@ -30,13 +30,10 @@ APP_BUILD_HASH=$(hash_file ios-checksums.txt) APP_BUILD_CACHEKEY="$BUILDKITE_PIPELINE_SLUG-ios-app-$PLATFORM-$ARCHITECTURE-$APP_BUILD_HASH" echo "--- :ios: Restore App build if present" -if [ -d "$PRODUCTS_PATH" ]; then - pushd "$PRODUCTS_PATH" - restore_cache "$APP_BUILD_CACHEKEY" - popd -else - echo "Error: Directory $PRODUCTS_PATH does not exist." -fi +mkdir -p "$PRODUCTS_PATH" +pushd "$PRODUCTS_PATH" +restore_cache "$APP_BUILD_CACHEKEY" +popd echo "--- :cocoapods: Restore Pods if present" pushd "$PODS_PATH" @@ -88,6 +85,7 @@ pushd "$PODS_PATH" save_cache "$PODS_FOLDER" "$PODFILE_CACHEKEY" popd +echo "--- :cocoapods: Save App build cache if necessary" # Save app build rm "$APP_PATH/main.jsbundle" rm -rf "$APP_PATH/assets" From 37e95747f6feb6ccae4d75c10f656a74af1cebe4 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 18:12:52 +0200 Subject: [PATCH 17/28] Add WDA cache --- .buildkite/commands/build-ios.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.buildkite/commands/build-ios.sh b/.buildkite/commands/build-ios.sh index e3a8dd399a..81d87eefab 100755 --- a/.buildkite/commands/build-ios.sh +++ b/.buildkite/commands/build-ios.sh @@ -28,6 +28,7 @@ find package-lock.json \ -type f -print0 | sort -z | xargs -0 shasum | tee ios-checksums.txt APP_BUILD_HASH=$(hash_file ios-checksums.txt) APP_BUILD_CACHEKEY="$BUILDKITE_PIPELINE_SLUG-ios-app-$PLATFORM-$ARCHITECTURE-$APP_BUILD_HASH" +WDA_BUILD_CACHEKEY="$BUILDKITE_PIPELINE_SLUG-ios-wda-$PLATFORM-$ARCHITECTURE-$APP_BUILD_HASH" echo "--- :ios: Restore App build if present" mkdir -p "$PRODUCTS_PATH" @@ -35,6 +36,11 @@ pushd "$PRODUCTS_PATH" restore_cache "$APP_BUILD_CACHEKEY" popd +echo "--- :ios: Restore WDA build if present" +pushd "$BUILD_PATH" +restore_cache "$WDA_BUILD_CACHEKEY" +popd + echo "--- :cocoapods: Restore Pods if present" pushd "$PODS_PATH" restore_cache "$PODFILE_CACHEKEY" @@ -60,7 +66,7 @@ echo '--- :react: Build iOS app for E2E testing' test -e "$APP_PATH/GutenbergDemo" || npm run core test:e2e:build-app:ios echo '--- :react: Build WDA for E2E testing' -npm run core test:e2e:build-wda +test -d "$BUILD_PATH/WDA" || npm run core test:e2e:build-wda echo '--- :compression: Prepare artifacts' # Set the working directory @@ -85,10 +91,15 @@ pushd "$PODS_PATH" save_cache "$PODS_FOLDER" "$PODFILE_CACHEKEY" popd -echo "--- :cocoapods: Save App build cache if necessary" +echo "--- :ios: Save App build cache if necessary" # Save app build rm "$APP_PATH/main.jsbundle" rm -rf "$APP_PATH/assets" pushd "$PRODUCTS_PATH" save_cache "GutenbergDemo.app" "$APP_BUILD_CACHEKEY" +popd + +echo "--- :ios: Save WDA build cache if necessary" +pushd "$BUILD_PATH" +save_cache "WDA" "$WDA_BUILD_CACHEKEY" popd \ No newline at end of file From ca112b1c44fd7fab7232cbb06966ee642d3bcac5 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 18:22:14 +0200 Subject: [PATCH 18/28] Remove comment --- .buildkite/commands/build-ios.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.buildkite/commands/build-ios.sh b/.buildkite/commands/build-ios.sh index 81d87eefab..2d50ac447d 100755 --- a/.buildkite/commands/build-ios.sh +++ b/.buildkite/commands/build-ios.sh @@ -92,7 +92,6 @@ save_cache "$PODS_FOLDER" "$PODFILE_CACHEKEY" popd echo "--- :ios: Save App build cache if necessary" -# Save app build rm "$APP_PATH/main.jsbundle" rm -rf "$APP_PATH/assets" pushd "$PRODUCTS_PATH" From 469f7be4987a4c4da3dca15d990d36c07d4c6d81 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 18:48:50 +0200 Subject: [PATCH 19/28] Restore other jobs --- .buildkite/pipeline.yml | 458 ++++++++++++++++++++-------------------- 1 file changed, 229 insertions(+), 229 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 1ff9674432..5e27beab4b 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -24,120 +24,120 @@ x-common-params: build.branch != 'trunk' && build.branch !~ /^release.*/ && build.branch !~ /^dependabot\/submodules.*/ steps: - # - label: Lint - # key: lint - # plugins: - # - *ci_toolkit_plugin - # - *git-partial-clone-plugin - # - *nvm_plugin - # agents: - # queue: android - # command: .buildkite/commands/lint.sh - # notify: - # - github_commit_status: - # context: Lint + - label: Lint + key: lint + plugins: + - *ci_toolkit_plugin + - *git-partial-clone-plugin + - *nvm_plugin + agents: + queue: android + command: .buildkite/commands/lint.sh + notify: + - github_commit_status: + context: Lint - # - label: Android Unit Tests - # key: android-unit-tests - # plugins: - # - *git-partial-clone-plugin - # - *nvm_plugin - # - *ci_toolkit_plugin - # agents: - # queue: android - # command: .buildkite/commands/unit-tests-android.sh - # env: - # JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml - # artifact_paths: - # - ./logs/*.log - # - ./reports/test-results/*.xml - # notify: - # - github_commit_status: - # context: Android Unit Tests + - label: Android Unit Tests + key: android-unit-tests + plugins: + - *git-partial-clone-plugin + - *nvm_plugin + - *ci_toolkit_plugin + agents: + queue: android + command: .buildkite/commands/unit-tests-android.sh + env: + JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml + artifact_paths: + - ./logs/*.log + - ./reports/test-results/*.xml + notify: + - github_commit_status: + context: Android Unit Tests - # - label: iOS Unit Tests - # key: ios-unit-tests - # plugins: - # - *nvm_plugin - # - *ci_toolkit_plugin - # - *git-partial-clone-plugin - # agents: - # queue: android - # command: .buildkite/commands/unit-tests-ios.sh - # env: - # JEST_JUNIT_OUTPUT_FILE: reports/test-results/ios-test-results.xml - # artifact_paths: - # - ./logs/*.log - # - ./reports/test-results/*.xml - # notify: - # - github_commit_status: - # context: iOS Unit Tests + - label: iOS Unit Tests + key: ios-unit-tests + plugins: + - *nvm_plugin + - *ci_toolkit_plugin + - *git-partial-clone-plugin + agents: + queue: android + command: .buildkite/commands/unit-tests-ios.sh + env: + JEST_JUNIT_OUTPUT_FILE: reports/test-results/ios-test-results.xml + artifact_paths: + - ./logs/*.log + - ./reports/test-results/*.xml + notify: + - github_commit_status: + context: iOS Unit Tests - # - label: React Native Editor Android Tests - # key: android-unit-tests-editor - # command: | - # .buildkite/commands/install-node-dependencies.sh --prefix gutenberg --ignore-scripts - # echo "--- :android: Run tests" - # cd gutenberg/packages/react-native-editor/android - # ./gradlew testDebug - # plugins: - # - *ci_toolkit_plugin - # - *git-partial-clone-plugin - # - *nvm_plugin - # agents: - # queue: android + - label: React Native Editor Android Tests + key: android-unit-tests-editor + command: | + .buildkite/commands/install-node-dependencies.sh --prefix gutenberg --ignore-scripts + echo "--- :android: Run tests" + cd gutenberg/packages/react-native-editor/android + ./gradlew testDebug + plugins: + - *ci_toolkit_plugin + - *git-partial-clone-plugin + - *nvm_plugin + agents: + queue: android - # - label: React Native Bridge Android Tests - # key: android-unit-tests-bridge - # command: | - # .buildkite/commands/install-node-dependencies.sh --prefix gutenberg --ignore-scripts - # echo "--- :android: Run tests" - # cd gutenberg/packages/react-native-bridge/android - # ./gradlew test - # plugins: - # - *ci_toolkit_plugin - # - *git-partial-clone-plugin - # - *nvm_plugin - # agents: - # queue: android + - label: React Native Bridge Android Tests + key: android-unit-tests-bridge + command: | + .buildkite/commands/install-node-dependencies.sh --prefix gutenberg --ignore-scripts + echo "--- :android: Run tests" + cd gutenberg/packages/react-native-bridge/android + ./gradlew test + plugins: + - *ci_toolkit_plugin + - *git-partial-clone-plugin + - *nvm_plugin + agents: + queue: android - # - label: Build JS Bundles - # key: js-bundles - # plugins: - # - *ci_toolkit_plugin - # - *nvm_plugin - # command: .buildkite/commands/build-bundles.sh - # agents: - # queue: mac - # env: *xcode_agent_env + - label: Build JS Bundles + key: js-bundles + plugins: + - *ci_toolkit_plugin + - *nvm_plugin + command: .buildkite/commands/build-bundles.sh + agents: + queue: mac + env: *xcode_agent_env - # - label: "Build Android RN Aztec & Publish to S3" - # key: "publish-react-native-aztec-android" - # plugins: - # - *git-partial-clone-plugin - # - *publish-android-artifacts-docker-container - # command: .buildkite/commands/publish-react-native-aztec-android-artifacts.sh + - label: "Build Android RN Aztec & Publish to S3" + key: "publish-react-native-aztec-android" + plugins: + - *git-partial-clone-plugin + - *publish-android-artifacts-docker-container + command: .buildkite/commands/publish-react-native-aztec-android-artifacts.sh - # - label: "Build Android RN Bridge & Publish to S3" - # depends_on: - # - "js-bundles" - # - "publish-react-native-aztec-android" - # plugins: - # - *git-partial-clone-plugin - # - *publish-android-artifacts-docker-container - # command: .buildkite/commands/publish-react-native-bridge-android-artifacts.sh + - label: "Build Android RN Bridge & Publish to S3" + depends_on: + - "js-bundles" + - "publish-react-native-aztec-android" + plugins: + - *git-partial-clone-plugin + - *publish-android-artifacts-docker-container + command: .buildkite/commands/publish-react-native-bridge-android-artifacts.sh - # - label: Build iOS RN XCFramework & Publish to S3 - # depends_on: js-bundles - # command: .buildkite/commands/publish-react-native-ios-artifacts.sh - # artifact_paths: - # - ios-xcframework/build/xcframeworks/*.tar.gz - # plugins: - # - *ci_toolkit_plugin - # - *nvm_plugin - # agents: - # queue: mac - # env: *xcode_agent_env + - label: Build iOS RN XCFramework & Publish to S3 + depends_on: js-bundles + command: .buildkite/commands/publish-react-native-ios-artifacts.sh + artifact_paths: + - ios-xcframework/build/xcframeworks/*.tar.gz + plugins: + - *ci_toolkit_plugin + - *nvm_plugin + agents: + queue: mac + env: *xcode_agent_env - label: iOS Build key: ios-build @@ -167,134 +167,134 @@ steps: - github_commit_status: context: Test iOS on Device - Canaries - # - label: Android Build and Sauce Labs - # key: android-build-and-saucelabs - # command: .buildkite/commands/build-android.sh - # plugins: - # - *ci_toolkit_plugin - # - *git-partial-clone-plugin - # - *nvm_plugin - # agents: - # queue: android + - label: Android Build and Sauce Labs + key: android-build-and-saucelabs + command: .buildkite/commands/build-android.sh + plugins: + - *ci_toolkit_plugin + - *git-partial-clone-plugin + - *nvm_plugin + agents: + queue: android - # - label: Test Android on Device – Canary Pages - # depends_on: android-build-and-saucelabs - # command: .buildkite/commands/test-android.sh --canary - # plugins: - # - *ci_toolkit_plugin - # - *nvm_plugin - # - *git-partial-clone-plugin - # agents: - # queue: android - # artifact_paths: - # - reports/test-results/android-test-results.xml - # env: - # JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml - # notify: - # - github_commit_status: - # context: Test Android on Device - Canaries + - label: Test Android on Device – Canary Pages + depends_on: android-build-and-saucelabs + command: .buildkite/commands/test-android.sh --canary + plugins: + - *ci_toolkit_plugin + - *nvm_plugin + - *git-partial-clone-plugin + agents: + queue: android + artifact_paths: + - reports/test-results/android-test-results.xml + env: + JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml + notify: + - github_commit_status: + context: Test Android on Device - Canaries - # - block: "Full UI Tests" - # # Show only in branches that run the quick UI tests suite, to optionally run the full suite - # if: *is_branch_for_quick_ui_tests - # key: run-full-ui-test - # prompt: "Run full UI tests suites?" - # depends_on: ios-build-and-saucelabs + - block: "Full UI Tests" + # Show only in branches that run the quick UI tests suite, to optionally run the full suite + if: *is_branch_for_quick_ui_tests + key: run-full-ui-test + prompt: "Run full UI tests suites?" + depends_on: ios - # - label: Test iOS on Device – Full iPhone - # # The quick UI tests suite version depends on the block step being unblocked - # if: *is_branch_for_quick_ui_tests - # depends_on: - # - ios-build-and-saucelabs - # - run-full-ui-test - # command: .buildkite/commands/test-ios.sh - # plugins: - # - *ci_toolkit_plugin - # - *nvm_plugin - # artifact_paths: - # - reports/test-results/ios-test-results.xml - # agents: - # queue: mac - # env: *xcode_agent_env + - label: Test iOS on Device – Full iPhone + # The quick UI tests suite version depends on the block step being unblocked + if: *is_branch_for_quick_ui_tests + depends_on: + - ios + - run-full-ui-test + command: .buildkite/commands/test-ios.sh + plugins: + - *ci_toolkit_plugin + - *nvm_plugin + artifact_paths: + - reports/test-results/ios-test-results.xml + agents: + queue: mac + env: *xcode_agent_env - # # Same step as above, but will always run in trunk, release/, and dependabot/submodules branches - # - label: Test iOS on Device – Full iPhone - # # The full UI tests suite version depends only on the ios-build step, meaning it has no manual step that triggers it - # if: *is_branch_for_full_ui_tests - # depends_on: - # - ios-build-and-saucelabs - # command: .buildkite/commands/test-ios.sh - # plugins: - # - *ci_toolkit_plugin - # - *nvm_plugin - # artifact_paths: - # - reports/test-results/ios-test-results.xml - # agents: - # queue: mac - # env: *xcode_agent_env + # Same step as above, but will always run in trunk, release/, and dependabot/submodules branches + - label: Test iOS on Device – Full iPhone + # The full UI tests suite version depends only on the ios-build step, meaning it has no manual step that triggers it + if: *is_branch_for_full_ui_tests + depends_on: + - ios + command: .buildkite/commands/test-ios.sh + plugins: + - *ci_toolkit_plugin + - *nvm_plugin + artifact_paths: + - reports/test-results/ios-test-results.xml + agents: + queue: mac + env: *xcode_agent_env - # - label: Test iOS on Device – Full iPad - # # The quick UI tests suite version depends on the block step being unblocked - # if: *is_branch_for_quick_ui_tests - # depends_on: - # - ios-build-and-saucelabs - # - run-full-ui-test - # command: .buildkite/commands/test-ios.sh --ipad - # plugins: - # - *ci_toolkit_plugin - # - *nvm_plugin - # artifact_paths: - # - reports/test-results/ios-test-results.xml - # agents: - # queue: mac - # env: *xcode_agent_env + - label: Test iOS on Device – Full iPad + # The quick UI tests suite version depends on the block step being unblocked + if: *is_branch_for_quick_ui_tests + depends_on: + - ios + - run-full-ui-test + command: .buildkite/commands/test-ios.sh --ipad + plugins: + - *ci_toolkit_plugin + - *nvm_plugin + artifact_paths: + - reports/test-results/ios-test-results.xml + agents: + queue: mac + env: *xcode_agent_env - # - label: Test iOS on Device – Full iPad - # # The full UI tests suite version depends only on the ios-build step, meaning it has no manual step that triggers it - # if: *is_branch_for_full_ui_tests - # depends_on: - # - ios-build-and-saucelabs - # command: .buildkite/commands/test-ios.sh --ipad - # plugins: - # - *ci_toolkit_plugin - # - *nvm_plugin - # artifact_paths: - # - reports/test-results/ios-test-results.xml - # agents: - # queue: mac - # env: *xcode_agent_env + - label: Test iOS on Device – Full iPad + # The full UI tests suite version depends only on the ios-build step, meaning it has no manual step that triggers it + if: *is_branch_for_full_ui_tests + depends_on: + - ios + command: .buildkite/commands/test-ios.sh --ipad + plugins: + - *ci_toolkit_plugin + - *nvm_plugin + artifact_paths: + - reports/test-results/ios-test-results.xml + agents: + queue: mac + env: *xcode_agent_env - # - label: Test Android on Device – Full - # # The quick UI tests suite version depends on the block step being unblocked - # if: *is_branch_for_quick_ui_tests - # depends_on: - # - android-build-and-saucelabs - # - run-full-ui-test - # command: .buildkite/commands/test-android.sh - # plugins: - # - *ci_toolkit_plugin - # - *nvm_plugin - # - *git-partial-clone-plugin - # agents: - # queue: android - # artifact_paths: - # - reports/test-results/android-test-results.xml - # env: - # JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml + - label: Test Android on Device – Full + # The quick UI tests suite version depends on the block step being unblocked + if: *is_branch_for_quick_ui_tests + depends_on: + - android-build-and-saucelabs + - run-full-ui-test + command: .buildkite/commands/test-android.sh + plugins: + - *ci_toolkit_plugin + - *nvm_plugin + - *git-partial-clone-plugin + agents: + queue: android + artifact_paths: + - reports/test-results/android-test-results.xml + env: + JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml - # - label: Test Android on Device – Full - # # The full UI tests suite version depends only on the android-build-and-suacelabs step, meaning it has no manual step that triggers it - # if: *is_branch_for_full_ui_tests - # depends_on: - # - android-build-and-saucelabs - # command: .buildkite/commands/test-android.sh - # plugins: - # - *ci_toolkit_plugin - # - *nvm_plugin - # - *git-partial-clone-plugin - # agents: - # queue: android - # artifact_paths: - # - reports/test-results/android-test-results.xml - # env: - # JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml + - label: Test Android on Device – Full + # The full UI tests suite version depends only on the android-build-and-suacelabs step, meaning it has no manual step that triggers it + if: *is_branch_for_full_ui_tests + depends_on: + - android-build-and-saucelabs + command: .buildkite/commands/test-android.sh + plugins: + - *ci_toolkit_plugin + - *nvm_plugin + - *git-partial-clone-plugin + agents: + queue: android + artifact_paths: + - reports/test-results/android-test-results.xml + env: + JEST_JUNIT_OUTPUT_FILE: reports/test-results/android-test-results.xml From 09b094f577e54bd241d85323fad4ccfdb53638ee Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 18:50:51 +0200 Subject: [PATCH 20/28] Fix ios build key --- .buildkite/pipeline.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 5e27beab4b..9d4df26af2 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -205,7 +205,7 @@ steps: # The quick UI tests suite version depends on the block step being unblocked if: *is_branch_for_quick_ui_tests depends_on: - - ios + - ios-build - run-full-ui-test command: .buildkite/commands/test-ios.sh plugins: @@ -222,7 +222,7 @@ steps: # The full UI tests suite version depends only on the ios-build step, meaning it has no manual step that triggers it if: *is_branch_for_full_ui_tests depends_on: - - ios + - ios-build command: .buildkite/commands/test-ios.sh plugins: - *ci_toolkit_plugin @@ -237,7 +237,7 @@ steps: # The quick UI tests suite version depends on the block step being unblocked if: *is_branch_for_quick_ui_tests depends_on: - - ios + - ios-build - run-full-ui-test command: .buildkite/commands/test-ios.sh --ipad plugins: @@ -253,7 +253,7 @@ steps: # The full UI tests suite version depends only on the ios-build step, meaning it has no manual step that triggers it if: *is_branch_for_full_ui_tests depends_on: - - ios + - ios-build command: .buildkite/commands/test-ios.sh --ipad plugins: - *ci_toolkit_plugin From 75fc8e90cead7c4361dc5fc6f325b80967ccc2e0 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 7 Jun 2024 19:19:07 +0200 Subject: [PATCH 21/28] Update Gutenberg ref --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 6b42d7ea8f..bde543a4f5 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 6b42d7ea8f0242b2300597927ba59e45a4cfac9e +Subproject commit bde543a4f59111bfe62999c418216bc0fd5c25c6 From 1436865c90d2538cfffa7df7363961e2a3b666ca Mon Sep 17 00:00:00 2001 From: Gerardo Date: Sat, 8 Jun 2024 15:50:16 +0200 Subject: [PATCH 22/28] Update Gutenberg ref --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index bde543a4f5..f0caa72e7a 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit bde543a4f59111bfe62999c418216bc0fd5c25c6 +Subproject commit f0caa72e7a719590df6a10cfe4e2dccfdb7420e7 From 3f358082974fef561abd3d8461be6d9fece5daa1 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Sat, 8 Jun 2024 16:02:40 +0200 Subject: [PATCH 23/28] Dont start the simulator --- .buildkite/commands/test-ios.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/.buildkite/commands/test-ios.sh b/.buildkite/commands/test-ios.sh index f4d5267e66..f839ad9e28 100755 --- a/.buildkite/commands/test-ios.sh +++ b/.buildkite/commands/test-ios.sh @@ -35,9 +35,6 @@ else TESTS_CMD='device-tests' fi -echo "--- :ios: Start booting up simulator" -xcrun simctl boot "$DEVICE_NAME" & - echo "--- 📦 Downloading Build Artifacts" export IOS_APP_PATH=./gutenberg/packages/react-native-editor/ios/GutenbergDemo.app.zip download_artifact "GutenbergDemo.app.zip" "$IOS_APP_PATH" From 3a8d6edfac0a243cdf23b3d121e0630b568a7690 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Sat, 8 Jun 2024 16:08:35 +0200 Subject: [PATCH 24/28] Use production flag to speed up jetpack --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 00bb1cced1..74b9b7c49c 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "webdriverio": "8.16.20" }, "scripts": { - "postinstall": "npm ci --prefix gutenberg && ./bin/run-block-experiments-command.sh && npm run i18n:check-cache && ./bin/run-jetpack-command.sh \"install --prefer-offline --ignore-scripts\"", + "postinstall": "npm ci --prefix gutenberg && ./bin/run-block-experiments-command.sh && npm run i18n:check-cache && ./bin/run-jetpack-command.sh \"install --prefer-offline --ignore-scripts --production\"", "start": "echo \"\\x1b[33mThe start command is not available in this project. It is strongly recommended to use \\x1b[1:33mstart:reset\\x1b[0m\\x1b[33m to perform some cleanup when starting the metro bundler.\nOr you may use \\x1b[1:33mstart:quick\\x1b[0m\\x1b[33m for a quicker startup, but this may lead to unexpected javascript errors when running the app.\\x1b[0m\"", "start:reset": "npm run core clean:runtime && npm run start:quick -- --reset-cache", "start:quick": "npm run core start:quick -- -- -- --config ../../../metro.config.js", From 2d294bb3fe575befae629ebe32f717c76d504bc3 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Sat, 8 Jun 2024 16:21:11 +0200 Subject: [PATCH 25/28] Remove production flag --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 74b9b7c49c..00bb1cced1 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "webdriverio": "8.16.20" }, "scripts": { - "postinstall": "npm ci --prefix gutenberg && ./bin/run-block-experiments-command.sh && npm run i18n:check-cache && ./bin/run-jetpack-command.sh \"install --prefer-offline --ignore-scripts --production\"", + "postinstall": "npm ci --prefix gutenberg && ./bin/run-block-experiments-command.sh && npm run i18n:check-cache && ./bin/run-jetpack-command.sh \"install --prefer-offline --ignore-scripts\"", "start": "echo \"\\x1b[33mThe start command is not available in this project. It is strongly recommended to use \\x1b[1:33mstart:reset\\x1b[0m\\x1b[33m to perform some cleanup when starting the metro bundler.\nOr you may use \\x1b[1:33mstart:quick\\x1b[0m\\x1b[33m for a quicker startup, but this may lead to unexpected javascript errors when running the app.\\x1b[0m\"", "start:reset": "npm run core clean:runtime && npm run start:quick -- --reset-cache", "start:quick": "npm run core start:quick -- -- -- --config ../../../metro.config.js", From 875aea802052138bf22a8909e72c2e922d20b94f Mon Sep 17 00:00:00 2001 From: Gerardo Date: Sat, 8 Jun 2024 17:06:33 +0200 Subject: [PATCH 26/28] Update Gutenberg ref --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index f0caa72e7a..923d3128af 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit f0caa72e7a719590df6a10cfe4e2dccfdb7420e7 +Subproject commit 923d3128af4c4d40e386a2a0e14d7961a590623b From b32257b8cb356d091c5419c1b3b9e6819b998650 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Sat, 8 Jun 2024 17:07:19 +0200 Subject: [PATCH 27/28] Try installing WDA to speed up tests --- .buildkite/commands/test-ios.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.buildkite/commands/test-ios.sh b/.buildkite/commands/test-ios.sh index f839ad9e28..8f833324a7 100755 --- a/.buildkite/commands/test-ios.sh +++ b/.buildkite/commands/test-ios.sh @@ -35,6 +35,9 @@ else TESTS_CMD='device-tests' fi +echo "--- :ios: Start booting up simulator" +xcrun simctl boot "$DEVICE_NAME" & + echo "--- 📦 Downloading Build Artifacts" export IOS_APP_PATH=./gutenberg/packages/react-native-editor/ios/GutenbergDemo.app.zip download_artifact "GutenbergDemo.app.zip" "$IOS_APP_PATH" @@ -43,6 +46,13 @@ export WDA_PATH=./gutenberg/packages/react-native-editor/ios/build/WDA download_artifact "WDA.zip" "$WDA_PATH/WDA.zip" unzip "$WDA_PATH/WDA.zip" -d "$WDA_PATH" +echo "--- 📦 Install WDA" + +APP_PATH="$WDA_PATH/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app" + +# Install the app to the booted simulator +xcrun simctl install booted $APP_PATH + # First, restore the caches, if any .buildkite/commands/install-node-dependencies.sh --restore-only # Second, set up the gutenberg-mobile dependencies without building the i18n cache (--ignore-scripts) From 2441d1881a1c19a8366ed444ec9a449ed940d6af Mon Sep 17 00:00:00 2001 From: Gerardo Date: Sat, 8 Jun 2024 17:22:02 +0200 Subject: [PATCH 28/28] Move WDA installation --- .buildkite/commands/test-ios.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.buildkite/commands/test-ios.sh b/.buildkite/commands/test-ios.sh index 8f833324a7..94ae3729aa 100755 --- a/.buildkite/commands/test-ios.sh +++ b/.buildkite/commands/test-ios.sh @@ -46,13 +46,6 @@ export WDA_PATH=./gutenberg/packages/react-native-editor/ios/build/WDA download_artifact "WDA.zip" "$WDA_PATH/WDA.zip" unzip "$WDA_PATH/WDA.zip" -d "$WDA_PATH" -echo "--- 📦 Install WDA" - -APP_PATH="$WDA_PATH/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app" - -# Install the app to the booted simulator -xcrun simctl install booted $APP_PATH - # First, restore the caches, if any .buildkite/commands/install-node-dependencies.sh --restore-only # Second, set up the gutenberg-mobile dependencies without building the i18n cache (--ignore-scripts) @@ -73,6 +66,13 @@ export JEST_JUNIT_OUTPUT_FILE="reports/test-results/ios-test-results.xml" export CIRCLE_BRANCH=${BUILDKITE_BRANCH} set +x +echo "--- 📦 Install WDA" + +APP_PATH="$WDA_PATH/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app" + +# Install the app to the booted simulator +xcrun simctl install booted $APP_PATH & + echo "--- :react: Prepare tests setup" npm run core test:e2e:setup