Skip to content

Commit

Permalink
[RN][CI] Test Old Arch with Maestro
Browse files Browse the repository at this point in the history
  • Loading branch information
cipolleschi committed Dec 4, 2024
1 parent 22072bf commit a418804
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 69 deletions.
13 changes: 9 additions & 4 deletions .github/actions/maestro-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ inputs:
required: false
default: "."
description: The directory from which metro should be started
architecture:
required: false
default: "NewArch"
description: The react native architecture to test

runs:
using: composite
Expand Down Expand Up @@ -52,6 +56,7 @@ runs:
if: ${{ inputs.flavor == 'debug' }}
run: ./packages/react-native-codegen/scripts/oss/build.sh
- name: Run e2e tests
id: run-tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 24
Expand All @@ -69,16 +74,16 @@ runs:
NORM_APP_ID=$(echo "${{ inputs.app-id }}" | tr '.' '-')
echo "app-id=$NORM_APP_ID" >> $GITHUB_OUTPUT
- name: Store tests result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.3.4
if: always()
with:
name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}
name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}_${{ inputs.architecture }}
path: |
report.xml
screen.mp4
- name: Store Logs
if: failure() && steps.run-tests.outcome == 'failure'
if: steps.run-tests.outcome == 'failure'
uses: actions/[email protected]
with:
name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }}
name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.architecture }}
path: /tmp/MaestroLogs
10 changes: 6 additions & 4 deletions .github/actions/maestro-ios/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ inputs:
required: false
default: "."
description: The directory from which metro should be started
architecture:
required: false
default: "NewArch"
description: The react native architecture to test

runs:
using: composite
Expand Down Expand Up @@ -86,8 +90,6 @@ runs:
CURR_ATTEMPT=$((CURR_ATTEMPT+1))
echo "Attempt number $CURR_ATTEMPT"
echo "Start video record using pid: video_record_${{ inputs.jsengine }}_$CURR_ATTEMPT.pid"
xcrun simctl io booted recordVideo video_record_$CURR_ATTEMPT.mov & echo $! > video_record_${{ inputs.jsengine }}_$CURR_ATTEMPT.pid
Expand All @@ -105,7 +107,7 @@ runs:
if: always()
uses: actions/[email protected]
with:
name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}
name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}_${{ inputs.architecture }}
path: |
video_record_1.mov
video_record_2.mov
Expand All @@ -117,5 +119,5 @@ runs:
if: failure() && steps.run-tests.outcome == 'failure'
uses: actions/[email protected]
with:
name: maestro-logs-${{ inputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }}
name: maestro-logs-${{ inputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.architecture }}
path: /tmp/MaestroLogs
5 changes: 3 additions & 2 deletions .github/workflow-scripts/maestro-android.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ async function main() {
stdio: 'ignore',
detached: true,
});
metroProcess.unref();
console.info(`- Metro PID: ${metroProcess.pid}`);
}

Expand Down Expand Up @@ -88,15 +89,15 @@ async function main() {
if (IS_DEBUG && metroProcess != null) {
const pid = metroProcess.pid;
console.info(`Kill Metro. PID: ${pid}`);
process.kill(-pid);
process.kill(pid);
console.info(`Metro Killed`);
process.exit();
}
}

if (error) {
throw error;
}
process.exit();
}

function sleep(ms) {
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ jobs:
flavor: ${{ matrix.flavor }}

test_e2e_ios_templateapp:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
#if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
runs-on: macos-13-large
needs: build_npm_package
env:
Expand All @@ -233,6 +233,7 @@ jobs:
matrix:
jsengine: [Hermes, JSC]
flavor: [Debug, Release]
architecture: [OldArch, NewArch]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -277,7 +278,12 @@ jobs:
cd /tmp/RNTestProject/ios
bundle install
HERMES_ENGINE_TARBALL_PATH=$HERMES_PATH bundle exec pod install
NEW_ARCH_ENABLED=1
if [[ ${{ matrix.architecture }} == "OldArch" ]]; then
echo "Disable the New Architecture"
NEW_ARCH_ENABLED=0
fi
HERMES_ENGINE_TARBALL_PATH=$HERMES_PATH RCT_NEW_ARCH_ENABLED=$NEW_ARCH_ENABLED bundle exec pod install
xcodebuild \
-scheme "RNTestProject" \
Expand All @@ -295,9 +301,10 @@ jobs:
maestro-flow: ./scripts/e2e/.maestro/
flavor: ${{ matrix.flavor }}
working-directory: /tmp/RNTestProject
architecture: ${{ matrix.architecture }}

test_e2e_android_templateapp:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
#if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
runs-on: 4-core-ubuntu
needs: build_npm_package
continue-on-error: true
Expand All @@ -306,6 +313,7 @@ jobs:
matrix:
jsengine: [Hermes, JSC]
flavor: [debug, release]
architecture: [OldArch, NewArch]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -351,6 +359,11 @@ jobs:
cd /tmp/RNTestProject
echo "react.internal.mavenLocalRepo=$MAVEN_LOCAL" >> android/gradle.properties
if [[ ${{matrix.architecture}} == "OldArch" ]]; then
echo "Disabling the New Architecture"
sed -i 's/newArchEnabled=true/newArchEnabled=false/' android/gradle.properties
fi
# Build
cd android
CAPITALIZED_FLAVOR=$(echo "${{ matrix.flavor }}" | awk '{print toupper(substr($0, 1, 1)) substr($0, 2)}')
Expand All @@ -366,6 +379,7 @@ jobs:
install-java: 'false'
flavor: ${{ matrix.flavor }}
working-directory: /tmp/RNTestProject
architecture: ${{ matrix.architecture }}

build_hermesc_linux:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -418,7 +432,7 @@ jobs:
uses: ./.github/actions/build-android
with:
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
run-e2e-tests: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
run-e2e-tests: true #${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}

test_e2e_android_rntester:
# Temporarily disable RNTester tests on Android as they are quite flaky and they make CI always red
Expand Down
110 changes: 55 additions & 55 deletions packages/rn-tester/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1862,82 +1862,82 @@ EXTERNAL SOURCES:
:path: "../react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
boost: 1dca942403ed9342f98334bf4c3621f011aa7946
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6
FBLazyVector: e7db65c2bf3e3bb1ffaf4f16d734f0ab40a078b4
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
glog: eb93e2f488219332457c3c4eafd2738ddc7e80b8
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
hermes-engine: 021bc62407987affecb4bc48b520997b588418ca
MyNativeView: d80002f68f81cf1c6f1cd1ad6561b6377132d8d9
NativeCxxModuleExample: c3e17e295af35c14cd545089feff605cd60ae434
MyNativeView: 7f8c126e64e1c1ead190b2a925b3deaab52918d0
NativeCxxModuleExample: acc403517a0ee410948a6f85e4d1c0fbd43959a2
OCMock: 589f2c84dacb1f5aaf6e4cec1f292551fe748e74
OSSLibraryExample: 4bc9349af82ae90545aa6aa310bf69169eec43ac
RCT-Folly: 36fe2295e44b10d831836cc0d1daec5f8abcf809
OSSLibraryExample: 69ad4fb88d6b2eb178446768e14c08acaa892f9b
RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82
RCTDeprecation: 84dec6c0281e9128d7b771e7e4454aa6059ee937
RCTRequired: c2ea429dc340fa73dd346e7986b423c16fc72b2e
RCTTypeSafety: 391bfaae72374d2bb08958a5bc0bd70770c66496
React: 612d188366f8bd8adad0f930b226efda62388d4c
React-callinvoker: db746883d011b634993d5af95b966193df0d2ad5
React-Core: 645ad9ff829297a0b50cf2189d4d3c5d31d2c32c
React-CoreModules: e34e797357e88cfec218f77c17a6f8dc01d36922
React-cxxreact: 770a0f4936374549241df9b5f571a45c36aa7d04
React-Core: 988d4a2821449b6ff872d318b6c7db4206bc3c27
React-CoreModules: ab2b44ad007db4628b1eaf715e33e1518bd070d5
React-cxxreact: 6618d6365edadcdcea6e31138108faaad8348d98
React-debug: 0001996df62d23a032c35f2bbbcd0ed7099678e3
React-defaultsnativemodule: 2834f4a6a428316246d9ad7610cde2836d145860
React-domnativemodule: f847bfd1e12189c3ee593563c069696a78a340b5
React-Fabric: a2ea54d8e629eb4aa7d89e318fb9bdb76947a6f6
React-FabricComponents: d987b86569e77da19ce62ab5ecc5b7ec06cba576
React-FabricImage: d73829f6399e5783323b67f251df592489ed8ebd
React-defaultsnativemodule: e855292b0461530a9c1d671bb743b65af05b6f7e
React-domnativemodule: a60b038946a930c62963c67f28543c56c8414f98
React-Fabric: 48a87029801fc24ae705a09716d037db2b258856
React-FabricComponents: 95fb5e4b3c0224b44284271d91d6dbedcb4c99e1
React-FabricImage: 493e84556497247b307ef81e619b2243b301c887
React-featureflags: cf4d4e42e08303c700f20f6d24745ec8b78aa655
React-featureflagsnativemodule: 55b6cc0422cc8d8c3eedc750d0731ab0af5aa7e4
React-graphics: 9ea3ce4c9ec6dbcd3b662fdb8e273ca11f07114f
React-hermes: 920161eeb38cbad4aaf5f696eba713d86ca3cd6a
React-idlecallbacksnativemodule: f46c64f53bed388a92b740717afda2c1a1019ec6
React-ImageManager: 9420e76855c8b79557526a50862ffffe57187dd6
React-jserrorhandler: 3d5daac659b6a542c8df38a4b7b2afec55712006
React-jsi: 81db93ca9f94a4d0923a9e2d278ce2ccefdd61f0
React-jsiexecutor: ca3b9c90bf934be23db3846db546d9e75a240dbc
React-jsinspector: fd2389f90427e6bbe80b4f24e4cce00851d60614
React-jsitracing: 95f55efd716d931a2a81e3d0680fe19ab8cc0829
React-logger: ef5b760fc7b57dae021e59efa2b102386dbaef22
React-Mapbuffer: 7a15e70003556cfbadc8f25383191cfb2a3a1de8
React-microtasksnativemodule: 7634ea681419ede09c40a7867ccdd9b5a29743e9
React-featureflagsnativemodule: 5b6ee949dd42e627c3f4413845d59fed38737d22
React-graphics: b6132d7868f01b84b297219d8946b576203dc579
React-hermes: a81a13cbb5bfbb45d9811dfb890efc011256f8bf
React-idlecallbacksnativemodule: 94ed2d395f601fa6e2ca2e18d4a47bd4ffbd55c9
React-ImageManager: ce9bc3c0ad3d7d30dead2d6dc3412a9000cd9cbb
React-jserrorhandler: 671c4aa3097f7c1d873ce9da66ae287c526beab7
React-jsi: fdd8cb6f1f34f5ef50921719f810bdd4ba27c78e
React-jsiexecutor: 0b2d9140fc7b0e1daaa3e80d296eafcd467dd57e
React-jsinspector: 767b0ebc6b0889c42e8830d366d0c48eefda8238
React-jsitracing: e5b58d02a58ed97de7254409f3712a1718b975cf
React-logger: 9dfed958fae2dc45f67b0ac521d75637164db1bf
React-Mapbuffer: 2eafb25a6767a0029e5372ffea2e8f512c2fa1ec
React-microtasksnativemodule: ec09ca045c02f8b06bbbe15de51ae26744d76005
React-nativeconfig: c703b7cc7964bee20057f85aa4917287ed59284c
React-NativeModulesApple: c60852b486e6c3eb1735486bc4ffdd7856d1f531
React-perflogger: af5b937875d1ec1b67bfbbb9a0da72183bd16f3e
React-performancetimeline: bb15b14668db2d813bb93b4420ac1fb196676925
React-NativeModulesApple: bfdd4acf0aee8d607c47a33dd78529771267b2c8
React-perflogger: 0f4c1073ae2b013c0b785a5b98618a39a94e1774
React-performancetimeline: db8eb2a64f03bbacaae6b2892501903f393054c1
React-RCTActionSheet: 06c2acf10ecad881bbea9a5fb62eff9a858db146
React-RCTAnimation: ac3b3e3016227669f332319ef02334da4825e9b1
React-RCTAppDelegate: 102c1d19bc4757cbdf76b804f85c1ff39412f4a7
React-RCTBlob: b44f94ceb48399699ef2e440b144320c2245b833
React-RCTFabric: 03dfacbfdea4c2ecc21bac3a60b77aa49ae3ca1f
React-RCTFBReactNativeSpec: d79d936382540632f261e260c8065d9ffd214f98
React-RCTImage: bb00717bfabeb9047ab10077b755c017da4a8823
React-RCTLinking: bf2a7fda9fff39f85ea759d57d948ab8f14932e2
React-RCTNetwork: 8b6419b9c6a9326bb567547ecc0208d32fecf100
React-RCTPushNotification: b122aac3bce6da117a7d9dd0909363f5389a6af2
React-RCTSettings: ca7b2ae2309f407ebcc8fd8b4d2d120d11a31f8c
React-RCTAnimation: b410c3ea49a067a2dda4fb6bef3db9adb67ab79c
React-RCTAppDelegate: bc9fe20b33851075c8111992cbfccdd400b657d7
React-RCTBlob: e85e7fd3e4c0131b465ed66b3495b4578fed829f
React-RCTFabric: 5c6b862bfd3fa2116e92d28f3924eda1f6475733
React-RCTFBReactNativeSpec: 0a58093cae0c2e73429804a28134a73739030dd1
React-RCTImage: 67541b77e3ab055113de29e016328b368b218943
React-RCTLinking: 52871c3d11667e0681d0617d77ec5567acc1788a
React-RCTNetwork: 7d06d55b0fb2bace14d42a9599f316d4abd10434
React-RCTPushNotification: 1e00808359116ab75ee672b29417192f648adeb8
React-RCTSettings: 211442946a1f32f65b60abf13b0317119c5826df
React-RCTTest: c18867fef4f7e396e73cbe1cbfc97234cc8ac941
React-RCTText: 3c81acb38f1c801bf81549555ba5f5b711bd01a1
React-RCTVibration: a479cc94a4c7332ea1566dd6fefee6b1c648756f
React-RCTText: 77c082f846a95ebe873dbd0a797dcd4a6d067a90
React-RCTVibration: bfc2aa982faac8c2c9bd4f65f10bb6a84fbd17fa
React-rendererconsistency: c5c9cec54b05055c6d37ced962d0708afbd0b7b0
React-rendererdebug: d2b3015c49def9f29f94a938a4cde8c096907640
React-rendererdebug: 3928b90c608063de42cc18063c3c8e485e5d95fe
React-rncore: 01b1c8846e5d820b918ae4be922952dfdbfa007b
React-RuntimeApple: 2d5c3d520574e068e0e98c9fc54480deca8ba1b3
React-RuntimeCore: afa22ebd846c01f1f59fddd52b4dea395544ac05
React-RuntimeApple: a83038cc520fed831128ad079f0e435b37f104f1
React-RuntimeCore: 109feacac04204d1f0adb938d9d74b14aa3dcb14
React-runtimeexecutor: 937d2677cbb39227ae1787a7655c375fac2c3a37
React-RuntimeHermes: 3d5781f51bf9de06e7de9e6bf6cf089be9c24c2c
React-runtimescheduler: 14fb14f46cc3cf30c53fef4a168feb01074dd353
React-RuntimeHermes: 3ecfa5b1c06657e370860e29f12a7bc9f9f541e3
React-runtimescheduler: 312ddc2e2a4d6f660371d7ceceedd9d82f84669d
React-timing: ccdbd633b8e83394dff07633ba8ac51195a5b048
React-utils: 98e182abdb8c107c060fc8c48fee0648cfc2f713
ReactAppDependencyProvider: 9e39e31212a66e8815a458fb757c4498f2dc5431
ReactCodegen: 2f41d8e13d41dff7de1a65c76cf3bee530f203fc
ReactCommon: 8ac92af85afc25720cb0ce32b29ee47988dc87cd
ReactCommon-Samples: 9491f55f16d34bf13369a1b2365fb6857cda6db9
ScreenshotManager: 8fadcec5a3ff6b0dfd46f2cb430e70780cde4590
React-utils: ff4a3a9aa9006c0eb943aacd6cf2bd2d0b53c7bf
ReactAppDependencyProvider: 4f2a13a9aeab61cc3b7dd53add5822452c513afa
ReactCodegen: 95633ff0fcd8df739869914e285b8fece8d4bfe6
ReactCommon: 536cd53579bd40a613f662e46269b7948e7c3473
ReactCommon-Samples: ed5bfa3790c71a2de64dcd4167cc1cf07391337c
ScreenshotManager: 57bd79e55f563c1fafbd5153b4dace2c43eeebab
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
Yoga: f883b669a85bf8cf22c157489d5a4c1799939a85

PODFILE CHECKSUM: 8591f96a513620a2a83a0b9a125ad3fa32ea1369

COCOAPODS: 1.14.3
COCOAPODS: 1.15.2

0 comments on commit a418804

Please sign in to comment.