From 5899f7c13159cec115aaa5efcf802faf1047a1c0 Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Wed, 6 Nov 2024 12:40:06 -0500 Subject: [PATCH 01/21] Add parameterized options for react native build tests --- build-system-tests/e2e/package.json | 2 +- build-system-tests/package.json | 17 +++++------------ build-system-tests/scripts/build-android.sh | 4 ++++ .../scripts/mega-app-copy-files.sh | 4 ++++ .../scripts/mega-app-create-app.sh | 9 +++++++-- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/build-system-tests/e2e/package.json b/build-system-tests/e2e/package.json index 80560e290e1..f261b44c115 100644 --- a/build-system-tests/e2e/package.json +++ b/build-system-tests/e2e/package.json @@ -7,7 +7,7 @@ "scripts": { "clean": "rimraf node_modules", "dev": "TZ=UTC cypress open", - "test": "TZ=UTC cypress run --spec 'features/**/*.feature'" + "test:web": "TZ=UTC cypress run --spec 'features/**/*.feature'" }, "cypress-cucumber-preprocessor": { "filterSpecs": true, diff --git a/build-system-tests/package.json b/build-system-tests/package.json index 3d1af7b3687..98845c74e40 100644 --- a/build-system-tests/package.json +++ b/build-system-tests/package.json @@ -10,8 +10,11 @@ "strip-json-comments-cli": "^2.0.2" }, "scripts": { - "test": "yarn --cwd e2e test", + "checkReactNativeLogs": "node --require esbuild-register ./scripts/checkReactNativeLog.ts", "pull": "./environments/pull-environments.sh", + "test:web": "yarn --cwd e2e test:web", + "test:react-native:build": "yarn --cwd e2e detox:build:android:debug", + "test:react-native": "yarn --cwd e2e detox:e2e:android:debug", "setup:react": "./scripts/setup-mega-app.sh", "setup:react:next": "./scripts/setup-mega-app.sh --build-tool next", "setup:react:vite": "./scripts/setup-mega-app.sh --build-tool vite", @@ -23,16 +26,6 @@ "setup:vue:nuxt": "./scripts/setup-mega-app.sh -F vue --build-tool nuxt", "setup:react-native": "./scripts/setup-mega-app.sh -F react-native", "setup:react-native:cli": "./scripts/setup-mega-app.sh -F react-native -B cli", - "setup:react-native:expo": "./scripts/setup-mega-app.sh -F react-native -B expo", - "rn-latest-cli-latest-ts-ios-ui-latest": "npm run setup:react-native:cli -- -A ios", - "rn-latest-cli-latest-ts-ios-ui-next": "npm run setup:react-native:cli -- -A ios -t next", - "rn-latest-cli-latest-ts-ios-ui-hotfix": "npm run setup:react-native:cli -- -A ios -t hotfix", - "rn-latest-cli-latest-ts-android-ui-latest": "npm run setup:react-native:cli -- -A android", - "rn-latest-cli-latest-ts-android-ui-next": "npm run setup:react-native:cli -- -A android -t next", - "rn-latest-cli-latest-ts-android-ui-hotfix": "npm run setup:react-native:cli -- -A android -t hotfix", - "rn-latest-expo-latest-ts-android-ui-latest": "npm run setup:react-native:expo -- -A android -n rn-latest-expo-latest-ts-android-ui-latest", - "rn-latest-expo-latest-ts-android-ui-next": "npm run setup:react-native:expo -- -A android -n rn-latest-expo-latest-ts-android-ui-next -t next", - "rn-latest-expo-latest-ts-android-ui-hotfix": "npm run setup:react-native:expo -- -A android -n rn-latest-expo-latest-ts-android-ui-hotfix -t hotfix", - "checkReactNativeLogs": "node --require esbuild-register ./scripts/checkReactNativeLog.ts" + "setup:react-native:expo": "./scripts/setup-mega-app.sh -F react-native -B expo" } } diff --git a/build-system-tests/scripts/build-android.sh b/build-system-tests/scripts/build-android.sh index 244e1061c1a..ca6d9ec1407 100755 --- a/build-system-tests/scripts/build-android.sh +++ b/build-system-tests/scripts/build-android.sh @@ -32,6 +32,7 @@ if [ $BUILD_TOOL == 'expo' ]; then # Run npm run android in the background npm run android -- -p 19000 >$LOG_FILE & npx wait-on -t 20000 tcp:19000 + npx expo prebuild else log "command" "cd android >$LOG_FILE " cd android >$LOG_FILE @@ -39,6 +40,9 @@ else ./gradlew clean >$LOG_FILE log "command" "cd .. >$LOG_FILE" cd .. >$LOG_FILE + log "command" "npm run start &" + npm run start & + npx wait-on -t 5000 tcp:8081 log "command" "npm run android >$LOG_FILE" npm run android >$LOG_FILE fi diff --git a/build-system-tests/scripts/mega-app-copy-files.sh b/build-system-tests/scripts/mega-app-copy-files.sh index d2c721b810c..b246bacd947 100755 --- a/build-system-tests/scripts/mega-app-copy-files.sh +++ b/build-system-tests/scripts/mega-app-copy-files.sh @@ -131,4 +131,8 @@ if [[ "$FRAMEWORK" == "react-native" ]]; then cp templates/components/react-native/cli/App.tsx mega-apps/${MEGA_APP_NAME}/App.tsx echo "cp $AWS_EXPORTS_FILE mega-apps/${MEGA_APP_NAME}/aws-exports.js" cp $AWS_EXPORTS_FILE mega-apps/${MEGA_APP_NAME}/aws-exports.js + # if [ "$BUILD_TOOL" == 'expo' ]; then + # echo npx json -I -f mega-apps/${MEGA_APP_NAME}/app.json -e "this.expo.android.package = 'com.anonymous.${MEGA_APP_NAME}'; this.expo.ios.bundleIdentifier = 'com.anonymous.${MEGA_APP_NAME}';" + # npx json -I -f mega-apps/${MEGA_APP_NAME}/app.json -e "this.expo.android.package = 'com.anonymous.${MEGA_APP_NAME}'; this.expo.ios.bundleIdentifier = 'com.anonymous.${MEGA_APP_NAME}';" + # fi fi diff --git a/build-system-tests/scripts/mega-app-create-app.sh b/build-system-tests/scripts/mega-app-create-app.sh index dccaa0eda5a..da87dc0b6a5 100755 --- a/build-system-tests/scripts/mega-app-create-app.sh +++ b/build-system-tests/scripts/mega-app-create-app.sh @@ -100,8 +100,13 @@ if [[ "$FRAMEWORK" == 'react-native' ]]; then echo "rm -rf $MEGA_APP_NAME" # Remove $MEGA_APP_NAME if it exists rm -rf $MEGA_APP_NAME if [[ "$BUILD_TOOL" == 'cli' ]]; then - echo "npx react-native@${BUILD_TOOL_VERSION} init $MEGA_APP_NAME --version $FRAMEWORK_VERSION" - npx react-native@${BUILD_TOOL_VERSION} init $MEGA_APP_NAME --version $FRAMEWORK_VERSION + if [[ $BUILD_TOOL_VERSION == 9 ]]; then # RN CLI v9 doesn't recognize --pm flag + echo "npx @react-native-community/cli@$BUILD_TOOL_VERSION init $MEGA_APP_NAME --version $FRAMEWORK_VERSION" + npx @react-native-community/cli@$BUILD_TOOL_VERSION init $MEGA_APP_NAME --version $FRAMEWORK_VERSION + else # --pm flag fixes https://github.com/CocoaPods/CocoaPods/issues/12546 + echo "npx @react-native-community/cli@$BUILD_TOOL_VERSION init $MEGA_APP_NAME --version $FRAMEWORK_VERSION --pm npm" + npx @react-native-community/cli@$BUILD_TOOL_VERSION init $MEGA_APP_NAME --version $FRAMEWORK_VERSION --pm npm + fi # React-Native, since 0.71.8, # no longer shows warning "npm WARN exec The following package was not found and will be installed: react-native@0.71.8", # so we log the package.json to check the versions From 30e340b39161b0c1ec17b1761bdb8ed34407c9ff Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Wed, 6 Nov 2024 12:42:55 -0500 Subject: [PATCH 02/21] update workflows --- ...eusable-build-system-test-react-native.yml | 33 +++++++++++-------- .../workflows/reusable-build-system-test.yml | 2 +- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index 73d8e064afe..63856854351 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -16,24 +16,29 @@ jobs: fail-fast: false matrix: framework: [react-native] - framework-version: [latest] - # uncomment to re-enable - # build-tool: [cli, expo] - build-tool: [expo] + framework-version: + [ + { formatted: latest, value: latest }, + { formatted: 074, value: 0.74 }, + { formatted: 073, value: 0.73 }, + { formatted: 072, value: 0.72 }, + { formatted: 071, value: 0.71 }, + ] + build-tool: [cli, expo] build-tool-version: [latest] pkg-manager: [npm] - language: [ts] - node-version: [18] - platform: [ios, android] + node-version: [20] + # uncomment to enable + # platform: [ios, android] + platform: [android] logfile: [test.log] - pkg-manager-version: [latest] exclude: - build-tool: expo platform: ios env: - MEGA_APP_NAME: rn-${{ matrix.framework-version }}-${{ matrix.build-tool }}-${{ matrix.build-tool-version }}-${{ matrix.language }}-${{ matrix.platform }}-ui-${{ inputs.dist-tag }} - + MEGA_APP_NAME: rn${{ matrix.framework-version.formatted }}${{ matrix.build-tool }}${{ matrix.build-tool-version }}${{ matrix.platform }}ui${{ inputs.dist-tag }} + EMULATOR_PORT: 5554 steps: - name: Checkout Amplify UI uses: actions/checkout@b80ff79f1755d06ba70441c368a6fe801f5f3a62 # v4.1.3 https://github.com/actions/checkout/commit/cd7d8d697e10461458bc61a30d094dc601a8b017 @@ -53,7 +58,7 @@ jobs: uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: ./examples/react-native/ios/Pods - key: ${{ runner.os }}-cocoapods-${{ inputs.commit }} + key: ${{ runner.os }}-cocoapods restore-keys: pods-${{ hashFiles('examples/react-native/ios/Podfile.lock') }} env: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1 @@ -65,7 +70,7 @@ jobs: path: | ./node_modules **/node_modules - key: ${{ runner.os }}-nodemodules-${{ inputs.commit }} + key: ${{ runner.os }}-nodemodules env: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - name: Install Java 17 @@ -105,7 +110,7 @@ jobs: - name: Start Android emulator if: ${{ matrix.platform == 'android' }} run: | - nohup $ANDROID_HOME/emulator/emulator -avd Pixel_5_API_27 -no-boot-anim -no-audio -no-snapshot-load -gpu host -accel on & + nohup $ANDROID_HOME/emulator/emulator -avd Pixel_5_API_27 -port ${{ env.EMULATOR_PORT }} -no-boot-anim -no-audio -no-snapshot-load -gpu host -accel on & $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82' $ANDROID_HOME/platform-tools/adb devices # disable spell checker @@ -116,7 +121,7 @@ jobs: $ANDROID_HOME/platform-tools/adb shell settings put global animator_duration_scale 0.0 - name: Create MegaApp ${{ env.MEGA_APP_NAME }} and run build on NodeJS ${{ matrix.node-version }} - run: npm run ${{ env.MEGA_APP_NAME }} + run: npm run setup:${{matrix.framework}}:${{matrix.build-tool}} -- --name ${{ env.MEGA_APP_NAME }} --platform ${{matrix.platform}} --tag ${{inputs.dist-tag}} --framework-version ${{matrix.framework-version.value}} --build-tool-version ${{matrix.build-tool-version}} shell: bash working-directory: build-system-tests - name: Detect Mega App Error in Log diff --git a/.github/workflows/reusable-build-system-test.yml b/.github/workflows/reusable-build-system-test.yml index ee703d3f2b9..bb0d0bc6a34 100644 --- a/.github/workflows/reusable-build-system-test.yml +++ b/.github/workflows/reusable-build-system-test.yml @@ -153,7 +153,7 @@ jobs: env: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1 - name: Run E2E tests against ${{ env.MEGA_APP_NAME }} example - run: npm run test + run: npm run test:web id: e2e working-directory: build-system-tests env: From a4042bf4edcb084507f79f19fb22e24078d1968c Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Wed, 6 Nov 2024 12:43:46 -0500 Subject: [PATCH 03/21] Add pooc workflows --- .../poc-build-system-test-react-native.yml | 16 +++++++++++++ .github/workflows/poc-build-system-test.yml | 23 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/poc-build-system-test-react-native.yml create mode 100644 .github/workflows/poc-build-system-test.yml diff --git a/.github/workflows/poc-build-system-test-react-native.yml b/.github/workflows/poc-build-system-test-react-native.yml new file mode 100644 index 00000000000..f1bce53cdb6 --- /dev/null +++ b/.github/workflows/poc-build-system-test-react-native.yml @@ -0,0 +1,16 @@ +# Description: this workflow runs build mega-apps that have all the connected components for React Native. + +name: POC / Build System Test Canary / React Native / parameterize + +permissions: + id-token: write # This is required for aws-actions/configure-aws-credentials + +on: + pull_request: + branches: [rn-parameterize-build-test] + +jobs: + build: + uses: ./.github/workflows/reusable-build-system-test-react-native.yml + with: + dist-tag: latest diff --git a/.github/workflows/poc-build-system-test.yml b/.github/workflows/poc-build-system-test.yml new file mode 100644 index 00000000000..797085d1882 --- /dev/null +++ b/.github/workflows/poc-build-system-test.yml @@ -0,0 +1,23 @@ +# Description: this workflow runs build mega-apps that have all the connected components. + +name: POC / Build System Test Canary / parameterize + +permissions: + id-token: write # This is required for aws-actions/configure-aws-credentials + +on: + pull_request: + branches: [rn-parameterize-build-test] + +jobs: + build: + uses: ./.github/workflows/reusable-build-system-test.yml + with: + dist-tag: latest + secrets: + AUTH_E2E_ROLE_ARN: ${{ secrets.AUTH_E2E_ROLE_ARN }} + DOMAIN: ${{ secrets.DOMAIN }} + PHONE_NUMBER: ${{ secrets.PHONE_NUMBER }} + USERNAME: ${{ secrets.USERNAME }} + NEW_PASSWORD: ${{ secrets.NEW_PASSWORD }} + VALID_PASSWORD: ${{ secrets.VALID_PASSWORD }} From 21801bbd9d3556a68c2fdbdc04afff51f459b15b Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Wed, 6 Nov 2024 13:00:24 -0500 Subject: [PATCH 04/21] Add package for expo --- build-system-tests/scripts/mega-app-copy-files.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build-system-tests/scripts/mega-app-copy-files.sh b/build-system-tests/scripts/mega-app-copy-files.sh index b246bacd947..1ca6bdde359 100755 --- a/build-system-tests/scripts/mega-app-copy-files.sh +++ b/build-system-tests/scripts/mega-app-copy-files.sh @@ -131,8 +131,9 @@ if [[ "$FRAMEWORK" == "react-native" ]]; then cp templates/components/react-native/cli/App.tsx mega-apps/${MEGA_APP_NAME}/App.tsx echo "cp $AWS_EXPORTS_FILE mega-apps/${MEGA_APP_NAME}/aws-exports.js" cp $AWS_EXPORTS_FILE mega-apps/${MEGA_APP_NAME}/aws-exports.js - # if [ "$BUILD_TOOL" == 'expo' ]; then - # echo npx json -I -f mega-apps/${MEGA_APP_NAME}/app.json -e "this.expo.android.package = 'com.anonymous.${MEGA_APP_NAME}'; this.expo.ios.bundleIdentifier = 'com.anonymous.${MEGA_APP_NAME}';" - # npx json -I -f mega-apps/${MEGA_APP_NAME}/app.json -e "this.expo.android.package = 'com.anonymous.${MEGA_APP_NAME}'; this.expo.ios.bundleIdentifier = 'com.anonymous.${MEGA_APP_NAME}';" - # fi + if [ "$BUILD_TOOL" == 'expo' ]; then + # Fixes "Project must have a `android.package` set in the Expo config (app.json or app.config.js)." + echo npx json -I -f mega-apps/${MEGA_APP_NAME}/app.json -e "this.expo.android.package = 'com.anonymous.${MEGA_APP_NAME}'; this.expo.ios.bundleIdentifier = 'com.anonymous.${MEGA_APP_NAME}';" + npx json -I -f mega-apps/${MEGA_APP_NAME}/app.json -e "this.expo.android.package = 'com.anonymous.${MEGA_APP_NAME}'; this.expo.ios.bundleIdentifier = 'com.anonymous.${MEGA_APP_NAME}';" + fi fi From 8fb8341a3e0b95e050a337d19cc165ce8b1e644c Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Wed, 6 Nov 2024 13:01:50 -0500 Subject: [PATCH 05/21] update framework versions --- .github/workflows/reusable-build-system-test-react-native.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index 63856854351..39f8b3e9245 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -18,7 +18,8 @@ jobs: framework: [react-native] framework-version: [ - { formatted: latest, value: latest }, + # { formatted: latest, value: latest }, + { formatted: 075, value: 0.75}, { formatted: 074, value: 0.74 }, { formatted: 073, value: 0.73 }, { formatted: 072, value: 0.72 }, From 68e334a26d49c08d69140f728ccf3a73e921ea5e Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Wed, 6 Nov 2024 13:30:46 -0500 Subject: [PATCH 06/21] Remove RN e2e stuff --- build-system-tests/package.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/build-system-tests/package.json b/build-system-tests/package.json index 98845c74e40..1965063055f 100644 --- a/build-system-tests/package.json +++ b/build-system-tests/package.json @@ -13,8 +13,6 @@ "checkReactNativeLogs": "node --require esbuild-register ./scripts/checkReactNativeLog.ts", "pull": "./environments/pull-environments.sh", "test:web": "yarn --cwd e2e test:web", - "test:react-native:build": "yarn --cwd e2e detox:build:android:debug", - "test:react-native": "yarn --cwd e2e detox:e2e:android:debug", "setup:react": "./scripts/setup-mega-app.sh", "setup:react:next": "./scripts/setup-mega-app.sh --build-tool next", "setup:react:vite": "./scripts/setup-mega-app.sh --build-tool vite", From ba91d4cdae88817b81637e6c7a65b958ef7e0dd6 Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Wed, 6 Nov 2024 13:40:08 -0500 Subject: [PATCH 07/21] try add latest --- .github/workflows/reusable-build-system-test-react-native.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index 39f8b3e9245..6bd2db8ef8c 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -18,7 +18,7 @@ jobs: framework: [react-native] framework-version: [ - # { formatted: latest, value: latest }, + { formatted: latest, value: latest }, { formatted: 075, value: 0.75}, { formatted: 074, value: 0.74 }, { formatted: 073, value: 0.73 }, From 997efdcf169ac636f5043f83737e4b310f1159ac Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Wed, 6 Nov 2024 14:11:43 -0500 Subject: [PATCH 08/21] Add build tool version for expo --- ...eusable-build-system-test-react-native.yml | 52 +++++++++++++++++++ .../scripts/mega-app-create-app.sh | 4 +- .../scripts/mega-app-install.sh | 4 ++ 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index 6bd2db8ef8c..4e3cc1869c1 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -36,6 +36,58 @@ jobs: exclude: - build-tool: expo platform: ios + - build-tool: expo + platform: android + framework-version: + - { formatted: 075, value: 0.75} + - { formatted: 074, value: 0.74 } + - { formatted: 073, value: 0.73 } + - { formatted: 072, value: 0.72 } + - { formatted: 071, value: 0.71 } + - { formatted: 070, value: 0.70 } + include: + - framework: react-native + framework-version: { formatted: 070, value: "0.70" } + build-tool: expo + build-tool-version: 47.0.0 + platform: android + pkg-manager: npm + node-version: 20 + logfile: test.log + - framework: react-native + framework-version: { formatted: 071, value: "0.71" } + build-tool: expo + build-tool-version: 48.0.0 + platform: android + pkg-manager: npm + node-version: 20 + logfile: test.log + - framework: react-native + framework-version: { formatted: 072, value: "0.72" } + build-tool: expo + build-tool-version: 49.0.0 + platform: android + pkg-manager: npm + node-version: 20 + logfile: test.log + - framework: react-native + framework-version: { formatted: 073, value: "0.73" } + build-tool: expo + build-tool-version: 50.0.0 + platform: android + pkg-manager: npm + node-version: 20 + logfile: test.log + - framework: react-native + framework-version: + - { formatted: 074, value: "0.74" } + - { formatted: 075, value: "0.75" } + build-tool: expo + build-tool-version: 51.0.0 + platform: android + pkg-manager: npm + node-version: 20 + logfile: test.log env: MEGA_APP_NAME: rn${{ matrix.framework-version.formatted }}${{ matrix.build-tool }}${{ matrix.build-tool-version }}${{ matrix.platform }}ui${{ inputs.dist-tag }} diff --git a/build-system-tests/scripts/mega-app-create-app.sh b/build-system-tests/scripts/mega-app-create-app.sh index da87dc0b6a5..e5b3e4da4a7 100755 --- a/build-system-tests/scripts/mega-app-create-app.sh +++ b/build-system-tests/scripts/mega-app-create-app.sh @@ -115,8 +115,8 @@ if [[ "$FRAMEWORK" == 'react-native' ]]; then echo "npm list react-native" npm list react-native elif [[ "$BUILD_TOOL" == "expo" ]]; then - echo "npx create-expo-app $MEGA_APP_NAME --template expo-template-blank-typescript" - npx create-expo-app $MEGA_APP_NAME --template expo-template-blank-typescript + echo "npx create-expo-app $MEGA_APP_NAME --version $BUILD_TOOL_VERSION --template expo-template-blank-typescript" + npx create-expo-app $MEGA_APP_NAME --version $BUILD_TOOL_VERSION --template expo-template-blank-typescript echo "cd $MEGA_APP_NAME" cd $MEGA_APP_NAME echo "npm list expo" # Log the package.json to check the expo version should be later than 48.0.19 diff --git a/build-system-tests/scripts/mega-app-install.sh b/build-system-tests/scripts/mega-app-install.sh index 1f3eb102ab0..1ff18b75845 100755 --- a/build-system-tests/scripts/mega-app-install.sh +++ b/build-system-tests/scripts/mega-app-install.sh @@ -109,6 +109,10 @@ else echo "npm install $DEPENDENCIES" npm install $DEPENDENCIES if [[ "$BUILD_TOOL" == "expo" ]]; then + if [[ "$FRAMEWORK_VERSION" == "0.75" ]]; then + # Expo SDK version 51.0.0 supports RN 0.74 and 0.75 but installs 0.74 by default https://expo.dev/changelog/2024/08-14-react-native-0.75#2-install-updated-packages + echo "npx expo install react-native@~0.75.0" + npx expo install react-native@~0.75.0 echo "npx expo install --fix" npx expo install --fix # fix the dependencies that are incompatible with the installed expo versio fi From df33abb0064d19b7619ccbd02d3f05dc4309991f Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Wed, 6 Nov 2024 14:56:39 -0500 Subject: [PATCH 09/21] fix typo --- build-system-tests/scripts/mega-app-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-system-tests/scripts/mega-app-install.sh b/build-system-tests/scripts/mega-app-install.sh index 1ff18b75845..ab694a0157b 100755 --- a/build-system-tests/scripts/mega-app-install.sh +++ b/build-system-tests/scripts/mega-app-install.sh @@ -112,7 +112,8 @@ else if [[ "$FRAMEWORK_VERSION" == "0.75" ]]; then # Expo SDK version 51.0.0 supports RN 0.74 and 0.75 but installs 0.74 by default https://expo.dev/changelog/2024/08-14-react-native-0.75#2-install-updated-packages echo "npx expo install react-native@~0.75.0" - npx expo install react-native@~0.75.0 + npx expo install react-native@~0.75.0 + fi echo "npx expo install --fix" npx expo install --fix # fix the dependencies that are incompatible with the installed expo versio fi From 56a973afc2b882ef35eb5152d8de495f8f71074c Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Wed, 6 Nov 2024 15:02:27 -0500 Subject: [PATCH 10/21] update build tool versions --- .../reusable-build-system-test-react-native.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index 4e3cc1869c1..2950b3d6094 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -49,7 +49,7 @@ jobs: - framework: react-native framework-version: { formatted: 070, value: "0.70" } build-tool: expo - build-tool-version: 47.0.0 + build-tool-version: 47 platform: android pkg-manager: npm node-version: 20 @@ -57,7 +57,7 @@ jobs: - framework: react-native framework-version: { formatted: 071, value: "0.71" } build-tool: expo - build-tool-version: 48.0.0 + build-tool-version: 48 platform: android pkg-manager: npm node-version: 20 @@ -65,7 +65,7 @@ jobs: - framework: react-native framework-version: { formatted: 072, value: "0.72" } build-tool: expo - build-tool-version: 49.0.0 + build-tool-version: 49 platform: android pkg-manager: npm node-version: 20 @@ -73,7 +73,7 @@ jobs: - framework: react-native framework-version: { formatted: 073, value: "0.73" } build-tool: expo - build-tool-version: 50.0.0 + build-tool-version: 50 platform: android pkg-manager: npm node-version: 20 @@ -83,7 +83,7 @@ jobs: - { formatted: 074, value: "0.74" } - { formatted: 075, value: "0.75" } build-tool: expo - build-tool-version: 51.0.0 + build-tool-version: 51 platform: android pkg-manager: npm node-version: 20 From 1046c3e26133d15ac4d0d96bb693a68374fb38c7 Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Thu, 7 Nov 2024 15:53:21 -0500 Subject: [PATCH 11/21] update resuable workflow --- .github/workflows/reusable-build-system-test-react-native.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index 2950b3d6094..9d64eb37920 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -38,6 +38,7 @@ jobs: platform: ios - build-tool: expo platform: android + build-tool-version: latest framework-version: - { formatted: 075, value: 0.75} - { formatted: 074, value: 0.74 } From 7fa1b0c6f59b2749d18d6db6d998707e7667fd82 Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Thu, 7 Nov 2024 16:00:31 -0500 Subject: [PATCH 12/21] update exclude --- ...eusable-build-system-test-react-native.yml | 42 +++++++++++-------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index 9d64eb37920..974589c7ff9 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -19,7 +19,7 @@ jobs: framework-version: [ { formatted: latest, value: latest }, - { formatted: 075, value: 0.75}, + { formatted: 075, value: 0.75 }, { formatted: 074, value: 0.74 }, { formatted: 073, value: 0.73 }, { formatted: 072, value: 0.72 }, @@ -38,17 +38,25 @@ jobs: platform: ios - build-tool: expo platform: android - build-tool-version: latest - framework-version: - - { formatted: 075, value: 0.75} - - { formatted: 074, value: 0.74 } - - { formatted: 073, value: 0.73 } - - { formatted: 072, value: 0.72 } - - { formatted: 071, value: 0.71 } - - { formatted: 070, value: 0.70 } - include: + framework-version: { formatted: '075', value: '0.75' } + - build-tool: expo + platform: android + framework-version: { formatted: '074', value: '0.74' } + - build-tool: expo + platform: android + framework-version: { formatted: '073', value: '0.73' } + - build-tool: expo + platform: android + framework-version: { formatted: '072', value: '0.72' } + - build-tool: expo + platform: android + framework-version: { formatted: '071', value: '0.71' } + - build-tool: expo + platform: android + framework-version: { formatted: '070', value: '0.70' } + include: - framework: react-native - framework-version: { formatted: 070, value: "0.70" } + framework-version: { formatted: 070, value: '0.70' } build-tool: expo build-tool-version: 47 platform: android @@ -56,7 +64,7 @@ jobs: node-version: 20 logfile: test.log - framework: react-native - framework-version: { formatted: 071, value: "0.71" } + framework-version: { formatted: 071, value: '0.71' } build-tool: expo build-tool-version: 48 platform: android @@ -64,7 +72,7 @@ jobs: node-version: 20 logfile: test.log - framework: react-native - framework-version: { formatted: 072, value: "0.72" } + framework-version: { formatted: 072, value: '0.72' } build-tool: expo build-tool-version: 49 platform: android @@ -72,7 +80,7 @@ jobs: node-version: 20 logfile: test.log - framework: react-native - framework-version: { formatted: 073, value: "0.73" } + framework-version: { formatted: 073, value: '0.73' } build-tool: expo build-tool-version: 50 platform: android @@ -80,9 +88,9 @@ jobs: node-version: 20 logfile: test.log - framework: react-native - framework-version: - - { formatted: 074, value: "0.74" } - - { formatted: 075, value: "0.75" } + framework-version: + - { formatted: 074, value: '0.74' } + - { formatted: 075, value: '0.75' } build-tool: expo build-tool-version: 51 platform: android From 47c193052a7ef72760fb05b022b430f1da6c6d11 Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Thu, 7 Nov 2024 16:04:49 -0500 Subject: [PATCH 13/21] add cli v 9 --- .../workflows/reusable-build-system-test-react-native.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index 974589c7ff9..ade08ec0d00 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -55,6 +55,14 @@ jobs: platform: android framework-version: { formatted: '070', value: '0.70' } include: + - framework: react-native + framework-version: { formatted: 070, value: '0.70' } + build-tool: cli + build-tool-version: 9 + platform: android + pkg-manager: npm + node-version: 20 + logfile: test.log - framework: react-native framework-version: { formatted: 070, value: '0.70' } build-tool: expo From 74e17b6b1e3dd5f51fa6ea54a26d047f10dd4a3e Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Thu, 7 Nov 2024 16:06:41 -0500 Subject: [PATCH 14/21] update includes --- .../reusable-build-system-test-react-native.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index ade08ec0d00..9e7bf6c918b 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -96,9 +96,15 @@ jobs: node-version: 20 logfile: test.log - framework: react-native - framework-version: - - { formatted: 074, value: '0.74' } - - { formatted: 075, value: '0.75' } + framework-version: { formatted: 074, value: '0.74' } + build-tool: expo + build-tool-version: 51 + platform: android + pkg-manager: npm + node-version: 20 + logfile: test.log + - framework: react-native + framework-version: { formatted: 075, value: '0.75' } build-tool: expo build-tool-version: 51 platform: android From 1d0f421373b4278dcf0b820e6620fa3dd31bd970 Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Fri, 8 Nov 2024 12:47:59 -0500 Subject: [PATCH 15/21] update version --- build-system-tests/scripts/mega-app-create-app.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build-system-tests/scripts/mega-app-create-app.sh b/build-system-tests/scripts/mega-app-create-app.sh index e5b3e4da4a7..a2ef544003b 100755 --- a/build-system-tests/scripts/mega-app-create-app.sh +++ b/build-system-tests/scripts/mega-app-create-app.sh @@ -115,11 +115,11 @@ if [[ "$FRAMEWORK" == 'react-native' ]]; then echo "npm list react-native" npm list react-native elif [[ "$BUILD_TOOL" == "expo" ]]; then - echo "npx create-expo-app $MEGA_APP_NAME --version $BUILD_TOOL_VERSION --template expo-template-blank-typescript" - npx create-expo-app $MEGA_APP_NAME --version $BUILD_TOOL_VERSION --template expo-template-blank-typescript + echo "npx create-expo-app $MEGA_APP_NAME --template expo-template-blank-typescript@$BUILD_TOOL_VERSION" + npx create-expo-app $MEGA_APP_NAME --template expo-template-blank-typescript@$BUILD_TOOL_VERSION echo "cd $MEGA_APP_NAME" cd $MEGA_APP_NAME - echo "npm list expo" # Log the package.json to check the expo version should be later than 48.0.19 + echo "npm list expo" # Log the package.json to check the expo version npm list expo echo "npx expo-env-info" npx expo-env-info From 3d14b0369922a4584bbf7118cbf246d89c7530d1 Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Fri, 8 Nov 2024 14:08:11 -0500 Subject: [PATCH 16/21] Temp disable latest --- .../reusable-build-system-test-react-native.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index 9e7bf6c918b..ad972ecabe9 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -18,12 +18,14 @@ jobs: framework: [react-native] framework-version: [ - { formatted: latest, value: latest }, + # uncomment to enable + # { formatted: latest, value: latest }, { formatted: 075, value: 0.75 }, { formatted: 074, value: 0.74 }, { formatted: 073, value: 0.73 }, { formatted: 072, value: 0.72 }, { formatted: 071, value: 0.71 }, + { formatted: 070, value: 0.70 }, ] build-tool: [cli, expo] build-tool-version: [latest] @@ -55,14 +57,6 @@ jobs: platform: android framework-version: { formatted: '070', value: '0.70' } include: - - framework: react-native - framework-version: { formatted: 070, value: '0.70' } - build-tool: cli - build-tool-version: 9 - platform: android - pkg-manager: npm - node-version: 20 - logfile: test.log - framework: react-native framework-version: { formatted: 070, value: '0.70' } build-tool: expo From 3f69d8069aa07d4d14de07b605286ec22075638d Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Fri, 8 Nov 2024 14:22:13 -0500 Subject: [PATCH 17/21] Disable cli 70 --- .../reusable-build-system-test-react-native.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index ad972ecabe9..d50c347fbae 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -25,7 +25,6 @@ jobs: { formatted: 073, value: 0.73 }, { formatted: 072, value: 0.72 }, { formatted: 071, value: 0.71 }, - { formatted: 070, value: 0.70 }, ] build-tool: [cli, expo] build-tool-version: [latest] @@ -36,6 +35,9 @@ jobs: platform: [android] logfile: [test.log] exclude: + - build-tool: cli + platform: android + framework-version: { formatted: '070', value: '0.70' } - build-tool: expo platform: ios - build-tool: expo @@ -57,6 +59,14 @@ jobs: platform: android framework-version: { formatted: '070', value: '0.70' } include: + - framework: react-native + framework-version: { formatted: 070, value: '0.70' } + build-tool: cli + build-tool-version: 9 + platform: android + pkg-manager: npm + node-version: 20 + logfile: test.log - framework: react-native framework-version: { formatted: 070, value: '0.70' } build-tool: expo From 2e3e0081c0fc34ba437e0dc4e90c3139f7daeeb6 Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Fri, 8 Nov 2024 14:23:23 -0500 Subject: [PATCH 18/21] remove unused line --- .../workflows/reusable-build-system-test-react-native.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index d50c347fbae..9556ff02775 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -35,9 +35,6 @@ jobs: platform: [android] logfile: [test.log] exclude: - - build-tool: cli - platform: android - framework-version: { formatted: '070', value: '0.70' } - build-tool: expo platform: ios - build-tool: expo @@ -55,9 +52,6 @@ jobs: - build-tool: expo platform: android framework-version: { formatted: '071', value: '0.71' } - - build-tool: expo - platform: android - framework-version: { formatted: '070', value: '0.70' } include: - framework: react-native framework-version: { formatted: 070, value: '0.70' } From 9ae947ee697a12ba9022b1a4b42005cde31115ce Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Fri, 8 Nov 2024 14:25:44 -0500 Subject: [PATCH 19/21] Remove cli 9 --- .../workflows/reusable-build-system-test-react-native.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index 9556ff02775..889d116d4e7 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -53,14 +53,6 @@ jobs: platform: android framework-version: { formatted: '071', value: '0.71' } include: - - framework: react-native - framework-version: { formatted: 070, value: '0.70' } - build-tool: cli - build-tool-version: 9 - platform: android - pkg-manager: npm - node-version: 20 - logfile: test.log - framework: react-native framework-version: { formatted: 070, value: '0.70' } build-tool: expo From eba7fe0d890e67326deb0603f9057edd537b85be Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Fri, 8 Nov 2024 14:41:32 -0500 Subject: [PATCH 20/21] Add comment --- .github/workflows/reusable-build-system-test-react-native.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index 889d116d4e7..d12befa35e6 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -53,6 +53,8 @@ jobs: platform: android framework-version: { formatted: '071', value: '0.71' } include: + # Expo CLI requires you specify a version of the SDK that supports that a particular version of React Native + # https://stackoverflow.com/questions/63463373/create-an-expo-project-with-a-specific-version - framework: react-native framework-version: { formatted: 070, value: '0.70' } build-tool: expo From 952c19c7b7285381071d56df3723731f8e1954e0 Mon Sep 17 00:00:00 2001 From: Emma Sauerborn Date: Fri, 8 Nov 2024 14:43:50 -0500 Subject: [PATCH 21/21] update wording --- .github/workflows/reusable-build-system-test-react-native.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index d12befa35e6..fbeab3a7626 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -53,7 +53,7 @@ jobs: platform: android framework-version: { formatted: '071', value: '0.71' } include: - # Expo CLI requires you specify a version of the SDK that supports that a particular version of React Native + # Expo makes you specify a version of the SDK that supports that a particular version of React Native # https://stackoverflow.com/questions/63463373/create-an-expo-project-with-a-specific-version - framework: react-native framework-version: { formatted: 070, value: '0.70' }