Detox with RN0.85.2 support (#4936)

* initial commit for 0.85.0-rc.7

* RN 0.85.2 update

* CI pipeline for RN085.2

* config update

* updated config

* update for ios 0.84

* iOS on RN0.84

* RN084 update

* pinned to RN085.2

* update for rn084

* cleanup
This commit is contained in:
mark.dev
2026-05-05 09:35:29 +03:00
committed by GitHub
parent ef3658236b
commit f8f0b0cc02
21 changed files with 619 additions and 764 deletions
@@ -1,14 +0,0 @@
- label: ":android::react: RN .83 + Android: Demo app"
command:
- "nvm install"
- "./scripts/demo-projects.android.sh"
env:
REACT_NATIVE_VERSION: 0.83.0
RCT_NEW_ARCH_ENABLED: 1
REACT_NATIVE_COMPAT_TEST: true # Only set 'true' in jobs with the latest supported RN
DETOX_DISABLE_POD_INSTALL: true
DETOX_DISABLE_POSTINSTALL: true
artifact_paths:
- "/Users/builder/uibuilder/work/coverage/**/*.lcov"
- "/Users/builder/uibuilder/work/artifacts*.tar.gz"
@@ -1,13 +0,0 @@
- label: ":android::react: RN .83 + Android: Demo app"
command:
- "nvm install"
- "./scripts/demo-projects.android.sh"
env:
REACT_NATIVE_VERSION: 0.83.0
RCT_NEW_ARCH_ENABLED: 1
DETOX_DISABLE_POD_INSTALL: true
DETOX_DISABLE_POSTINSTALL: true
artifact_paths:
- "/Users/builder/uibuilder/work/coverage/**/*.lcov"
- "/Users/builder/uibuilder/work/artifacts*.tar.gz"
@@ -1,9 +1,9 @@
- label: ":android::react: RN .84 + Android: Demo app"
- label: ":android::react: RN .85.2 + Android: Demo app"
command:
- "nvm install"
- "./scripts/demo-projects.android.sh"
env:
REACT_NATIVE_VERSION: 0.84.0
REACT_NATIVE_VERSION: 0.85.2
RCT_NEW_ARCH_ENABLED: 1
REACT_NATIVE_COMPAT_TEST: true
DETOX_DISABLE_POD_INSTALL: true
@@ -1,15 +0,0 @@
- label: ":android::detox: RN .83 + Android: Tests app"
command:
- "nvm install"
- "./scripts/ci.android.sh"
env:
REACT_NATIVE_VERSION: 0.83.0
RCT_NEW_ARCH_ENABLED: 1
TEST_GENYCLOUD_SANITY: true
DETOX_DISABLE_POD_INSTALL: true
DETOX_DISABLE_POSTINSTALL: true
artifact_paths:
- "/Users/builder/uibuilder/work/coverage/**/*.lcov"
- "/Users/builder/uibuilder/work/**/allure-report-*.html"
- "/Users/builder/uibuilder/work/artifacts*.tar.gz"
@@ -1,9 +1,9 @@
- label: ":android::detox: RN .83 + Android: Tests app"
- label: ":android::detox: RN .85.2 + Android: Tests app"
command:
- "nvm install"
- "./scripts/ci.android.sh"
env:
REACT_NATIVE_VERSION: 0.83.0
REACT_NATIVE_VERSION: 0.85.2
RCT_NEW_ARCH_ENABLED: 1
DETOX_DISABLE_POD_INSTALL: true
DETOX_DISABLE_POSTINSTALL: true
@@ -11,4 +11,3 @@
- "/Users/builder/uibuilder/work/coverage/**/*.lcov"
- "/Users/builder/uibuilder/work/**/allure-report-*.html"
- "/Users/builder/uibuilder/work/artifacts*.tar.gz"
@@ -1,12 +0,0 @@
- label: ":ios::react: RN .83 + iOS: Demo app"
command:
- "nvm install"
- "./scripts/demo-projects.ios.sh"
env:
REACT_NATIVE_VERSION: 0.83.0
RCT_NEW_ARCH_ENABLED: 1
REACT_NATIVE_COMPAT_TEST: true # Only set 'true' in jobs with the latest supported RN
artifact_paths:
- "/Users/builder/uibuilder/work/coverage/**/*.lcov"
- "/Users/builder/uibuilder/work/artifacts*.tar.gz"
@@ -1,11 +0,0 @@
- label: ":ios::react: RN .83 + iOS: Demo app"
command:
- "nvm install"
- "./scripts/demo-projects.ios.sh"
env:
REACT_NATIVE_VERSION: 0.83.0
RCT_NEW_ARCH_ENABLED: 1
artifact_paths:
- "/Users/builder/uibuilder/work/coverage/**/*.lcov"
- "/Users/builder/uibuilder/work/artifacts*.tar.gz"
@@ -1,9 +1,9 @@
- label: ":ios::react: RN .84 + iOS: Demo app"
- label: ":ios::react: RN .85.2 + iOS: Demo app"
command:
- "nvm install"
- "./scripts/demo-projects.ios.sh"
env:
REACT_NATIVE_VERSION: 0.84.0
REACT_NATIVE_VERSION: 0.85.2
RCT_NEW_ARCH_ENABLED: 1
REACT_NATIVE_COMPAT_TEST: true
artifact_paths:
-12
View File
@@ -1,12 +0,0 @@
- label: ":ios::detox: RN .83 + iOS: Tests app"
command:
- "nvm install"
- "./scripts/ci.ios.sh"
env:
REACT_NATIVE_VERSION: 0.83.0
RCT_NEW_ARCH_ENABLED: 1
artifact_paths:
- "/Users/builder/uibuilder/work/coverage/**/*.lcov"
- "/Users/builder/uibuilder/work/**/allure-report-*.html"
- "/Users/builder/uibuilder/work/artifacts*.tar.gz"
+2
View File
@@ -5,6 +5,8 @@
env:
REACT_NATIVE_VERSION: 0.84.0
RCT_NEW_ARCH_ENABLED: 1
RCT_USE_PREBUILT_RNCORE: 0
RCT_USE_RN_DEP: 0
artifact_paths:
- "/Users/builder/uibuilder/work/coverage/**/*.lcov"
- "/Users/builder/uibuilder/work/**/allure-report-*.html"
@@ -1,12 +1,11 @@
- label: ":ios::detox: RN .83 + iOS: Tests app"
- label: ":ios::detox: RN .85.2 + iOS: Tests app"
command:
- "nvm install"
- "./scripts/ci.ios.sh"
env:
REACT_NATIVE_VERSION: 0.83.0
REACT_NATIVE_VERSION: 0.85.2
RCT_NEW_ARCH_ENABLED: 1
artifact_paths:
- "/Users/builder/uibuilder/work/coverage/**/*.lcov"
- "/Users/builder/uibuilder/work/**/allure-report-*.html"
- "/Users/builder/uibuilder/work/artifacts*.tar.gz"
+4 -4
View File
@@ -2,12 +2,12 @@
echo "steps:"
cat .buildkite/jobs/pipeline.android_demo_app_rn_84.yml
cat .buildkite/jobs/pipeline.android_demo_app_rn_85_2.yml
cat .buildkite/jobs/pipeline.android_rn_77.yml
cat .buildkite/jobs/pipeline.android_rn_83.yml
cat .buildkite/jobs/pipeline.android_rn_84.yml
cat .buildkite/jobs/pipeline.ios_demo_app_rn_84.yml
cat .buildkite/jobs/pipeline.android_rn_85_2.yml
cat .buildkite/jobs/pipeline.ios_demo_app_rn_85_2.yml
cat .buildkite/jobs/pipeline.ios_rn_77.yml
cat .buildkite/jobs/pipeline.ios_rn_83.yml
cat .buildkite/jobs/pipeline.ios_rn_84.yml
cat .buildkite/jobs/pipeline.ios_rn_85_2.yml
cat .buildkite/pipeline.post_processing.yml
+1
View File
@@ -49,4 +49,5 @@ ext.rnInfo = [
isRN80OrHigher: rnMajorVer >= 80,
isRN81OrHigher: rnMajorVer >= 81,
isRN84OrHigher: rnMajorVer >= 84,
isRN85OrHigher: rnMajorVer >= 85,
]
+8 -8
View File
@@ -54,13 +54,13 @@
"postinstall": "node scripts/postinstall.js"
},
"devDependencies": {
"@react-native-community/cli": "20.0.2",
"@react-native-community/cli-platform-android": "20.0.2",
"@react-native-community/cli-platform-ios": "20.0.2",
"@react-native/babel-preset": "0.83.0",
"@react-native/eslint-config": "0.83.0",
"@react-native/metro-config": "0.83.0",
"@react-native/typescript-config": "0.83.0",
"@react-native-community/cli": "20.1.0",
"@react-native-community/cli-platform-android": "20.1.0",
"@react-native-community/cli-platform-ios": "20.1.0",
"@react-native/babel-preset": "0.85.2",
"@react-native/eslint-config": "0.85.2",
"@react-native/metro-config": "0.85.2",
"@react-native/typescript-config": "0.85.2",
"@tsconfig/react-native": "^3.0.0",
"@types/bunyan": "^1.8.8",
"@types/child-process-promise": "^2.2.1",
@@ -82,7 +82,7 @@
"jest-allure2-reporter": "^2.2.6",
"metro-react-native-babel-preset": "0.76.8",
"prettier": "^3.1.1",
"react-native": "0.84.0",
"react-native": "0.85.2",
"react-native-codegen": "^0.0.8",
"typescript": "^5.8.3",
"wtfnode": "^0.9.1"
+9 -9
View File
@@ -41,23 +41,23 @@
"@react-native-segmented-control/segmented-control": "^2.5.6",
"moment": "^2.30.1",
"react": "19.2.3",
"react-native": "0.84.0",
"react-native": "0.85.2",
"react-native-launch-arguments": "^4.0.2",
"react-native-permissions": "^5.2.1",
"react-native-webview": "^13.13.1",
"react-native-webview": "^13.16.1",
"ssim.js": "^3.5.0"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native-community/cli": "20.0.2",
"@react-native-community/cli-platform-android": "20.0.2",
"@react-native-community/cli-platform-ios": "20.0.2",
"@react-native/babel-preset": "0.83.0",
"@react-native/eslint-config": "0.83.0",
"@react-native/metro-config": "0.83.0",
"@react-native/typescript-config": "0.83.0",
"@react-native-community/cli": "20.1.0",
"@react-native-community/cli-platform-android": "20.1.0",
"@react-native-community/cli-platform-ios": "20.1.0",
"@react-native/babel-preset": "0.85.2",
"@react-native/eslint-config": "0.85.2",
"@react-native/metro-config": "0.85.2",
"@react-native/typescript-config": "0.85.2",
"@rnx-kit/align-deps": "^3.0.6",
"@tsconfig/react-native": "^3.0.0",
"@types/jest": "^29.5.11",
+7 -2
View File
@@ -1,4 +1,9 @@
/** @type {Detox.DetoxConfig} */
const isCIRN085 = Boolean(process.env.CI) && /^0\.85(\.|$)/.test(process.env.REACT_NATIVE_VERSION || '');
const iosCIBuildSettings = isCIRN085
? " ARCHS=arm64 ONLY_ACTIVE_ARCH=YES IPHONEOS_DEPLOYMENT_TARGET=15.1 OTHER_LDFLAGS='$(inherited) -lc++'"
: '';
module.exports = {
logger: {
level: process.env.CI ? 'debug' : undefined,
@@ -20,12 +25,12 @@ module.exports = {
"ios.release": {
"type": "ios.app",
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/example.app",
"build": "export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -workspace ios/example.xcworkspace -UseNewBuildSystem=NO -scheme example -configuration Release -sdk iphonesimulator -derivedDataPath ios/build -quiet",
"build": `export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -workspace ios/example.xcworkspace -UseNewBuildSystem=NO -scheme example -configuration Release -sdk iphonesimulator -derivedDataPath ios/build -quiet${iosCIBuildSettings}`,
},
"ios.debug": {
"type": "ios.app",
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/example.app",
"build": "xcodebuild -workspace ios/example.xcworkspace -UseNewBuildSystem=NO -scheme example -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
"build": `xcodebuild -workspace ios/example.xcworkspace -UseNewBuildSystem=NO -scheme example -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build${iosCIBuildSettings}`,
"start": "scripts/start-rn.sh ios",
},
"android.debug": {
+8 -8
View File
@@ -24,18 +24,18 @@
"dependencies": {
"@react-native-async-storage/async-storage": "^2.1.0",
"react": "19.2.3",
"react-native": "0.84.0",
"react-native": "0.85.2",
"tslib": "^2.0.3"
},
"devDependencies": {
"@babel/preset-env": "^7.25.3",
"@react-native-community/cli": "20.0.2",
"@react-native-community/cli-platform-android": "20.0.2",
"@react-native-community/cli-platform-ios": "20.0.2",
"@react-native/babel-preset": "0.83.0",
"@react-native/eslint-config": "0.83.0",
"@react-native/metro-config": "0.83.0",
"@react-native/typescript-config": "0.83.0",
"@react-native-community/cli": "20.1.0",
"@react-native-community/cli-platform-android": "20.1.0",
"@react-native-community/cli-platform-ios": "20.1.0",
"@react-native/babel-preset": "0.85.2",
"@react-native/eslint-config": "0.85.2",
"@react-native/metro-config": "0.85.2",
"@react-native/typescript-config": "0.85.2",
"@tsconfig/react-native": "^3.0.5",
"@types/fs-extra": "^9.0.13",
"@types/jest": "^29.2.1",
@@ -1,6 +1,31 @@
#!/bin/bash -ex
extract_minor_version() {
local version="$1"
version="${version#^}"
version="${version#~}"
version="${version#>=}"
version="${version#<=}"
version="${version#>}"
version="${version#<}"
echo "$version" | awk -F. '{print $2}'
}
clear_ios_pod_state_for_rn_downgrade() {
rm -f detox/test/ios/Podfile.lock examples/demo-react-native/ios/Podfile.lock
rm -rf detox/test/ios/Pods examples/demo-react-native/ios/Pods
}
if [ ! -z ${REACT_NATIVE_VERSION} ]; then
current_rn_version=$(node -e "console.log(require('./detox/test/package.json').dependencies['react-native'])")
current_minor=$(extract_minor_version "${current_rn_version}")
target_minor=$(extract_minor_version "${REACT_NATIVE_VERSION}")
if [[ "${current_minor}" =~ ^[0-9]+$ ]] && [[ "${target_minor}" =~ ^[0-9]+$ ]] && [ "${current_minor}" -gt "${target_minor}" ]; then
echo "Detected RN downgrade (${current_rn_version} -> ${REACT_NATIVE_VERSION}), clearing iOS pod state"
clear_ios_pod_state_for_rn_downgrade
fi
node scripts/change_react_native_version.js "examples/demo-react-native" ${REACT_NATIVE_VERSION} "dependencies"
node scripts/change_react_native_version.js "detox/test" ${REACT_NATIVE_VERSION} "dependencies"
node scripts/change_react_native_version.js "detox" ${REACT_NATIVE_VERSION} "devDependencies"
+32 -17
View File
@@ -28,28 +28,13 @@ async function run() {
packageJson.dependencies['react-native'] = reactNativeVersion;
}
updateReactNative73DevDependencies(reactNativeVersion, packageJson);
updateReactNative77DevDependencies(reactNativeVersion, packageJson);
updateReactNative84DevDependencies(reactNativeVersion, packageJson);
updateReactNative85DevDependencies(reactNativeVersion, packageJson);
fs.writeFileSync(filePath, JSON.stringify(packageJson, null, 2));
}
function updateReactNative73DevDependencies(reactNativeVersion, packageJson) {
const minorVersion = reactNativeVersion.split('.')[1];
if (minorVersion !== '73') {
return;
}
packageJson.devDependencies['@react-native/babel-preset'] = '0.73.21';
packageJson.devDependencies['@react-native/eslint-config'] = '0.73.2';
packageJson.devDependencies['@react-native/metro-config'] = '0.73.5';
packageJson.devDependencies['@react-native/typescript-config'] = '0.73.1';
delete packageJson.devDependencies['@react-native-community/cli'];
delete packageJson.devDependencies['@react-native-community/cli-platform-android'];
delete packageJson.devDependencies['@react-native-community/cli-platform-ios'];
}
function updateReactNative77DevDependencies(reactNativeVersion, packageJson) {
const minorVersion = reactNativeVersion.split('.')[1];
if (minorVersion !== '77') {
@@ -65,6 +50,36 @@ function updateReactNative77DevDependencies(reactNativeVersion, packageJson) {
packageJson.devDependencies['@react-native-community/cli-platform-ios'] = '15.0.1';
}
function updateReactNative84DevDependencies(reactNativeVersion, packageJson) {
const minorVersion = reactNativeVersion.split('.')[1];
if (minorVersion !== '84') {
return;
}
packageJson.devDependencies['@react-native/babel-preset'] = '0.84.0';
packageJson.devDependencies['@react-native/eslint-config'] = '0.84.0';
packageJson.devDependencies['@react-native/metro-config'] = '0.84.0';
packageJson.devDependencies['@react-native/typescript-config'] = '0.84.0';
packageJson.devDependencies['@react-native-community/cli'] = '20.1.0';
packageJson.devDependencies['@react-native-community/cli-platform-android'] = '20.1.0';
packageJson.devDependencies['@react-native-community/cli-platform-ios'] = '20.1.0';
}
function updateReactNative85DevDependencies(reactNativeVersion, packageJson) {
const minorVersion = reactNativeVersion.split('.')[1];
if (minorVersion !== '85') {
return;
}
packageJson.devDependencies['@react-native/babel-preset'] = reactNativeVersion;
packageJson.devDependencies['@react-native/eslint-config'] = reactNativeVersion;
packageJson.devDependencies['@react-native/metro-config'] = reactNativeVersion;
packageJson.devDependencies['@react-native/typescript-config'] = reactNativeVersion;
packageJson.devDependencies['@react-native-community/cli'] = '20.1.0';
packageJson.devDependencies['@react-native-community/cli-platform-android'] = '20.1.0';
packageJson.devDependencies['@react-native-community/cli-platform-ios'] = '20.1.0';
}
async function fetch(url) {
return new Promise((resolve, reject) => {
https.get(url, res => {
+25
View File
@@ -3,11 +3,36 @@
source $(dirname "$0")/logger.sh
source $(dirname "$0")/install.sh
extract_minor_version() {
local version="$1"
version="${version#^}"
version="${version#~}"
version="${version#>=}"
version="${version#<=}"
version="${version#>}"
version="${version#<}"
echo "$version" | awk -F. '{print $2}'
}
clear_ios_pod_state_for_rn_downgrade() {
rm -f detox/test/ios/Podfile.lock examples/demo-react-native/ios/Podfile.lock
rm -rf detox/test/ios/Pods examples/demo-react-native/ios/Pods
}
if [ -z "$REACT_NATIVE_VERSION" ]; then
echo "Error: REACT_NATIVE_VERSION variable was not defined!"
exit 1
fi
current_rn_version=$(node -e "console.log(require('./detox/test/package.json').dependencies['react-native'])")
current_minor=$(extract_minor_version "${current_rn_version}")
target_minor=$(extract_minor_version "${REACT_NATIVE_VERSION}")
if [[ "${current_minor}" =~ ^[0-9]+$ ]] && [[ "${target_minor}" =~ ^[0-9]+$ ]] && [ "${current_minor}" -gt "${target_minor}" ]; then
echo "Detected RN downgrade (${current_rn_version} -> ${REACT_NATIVE_VERSION}), clearing iOS pod state"
clear_ios_pod_state_for_rn_downgrade
fi
if [ "$REACT_NATIVE_COMPAT_TEST" != "true" ]; then
node scripts/change_react_native_version.js "detox" ${REACT_NATIVE_VERSION} "devDependencies"
fi
+490 -629
View File
File diff suppressed because it is too large Load Diff