Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Compatibility

on:
workflow_dispatch:

jobs:
compatibility:
runs-on: macos-15
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.react-native-version }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
react-native-version:
- '0.77.2'
- '0.78.2'
- '0.79.2'
- '0.80.0'
- '0.81.5'
- '0.82.1'
- '0.83.2'

steps:
- name: Checkout SDK
uses: actions/checkout@v6
with:
path: sdk

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 20

- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'

- name: Build SDK
working-directory: sdk
run: |
npm install
npm run prepare
npm pack

- name: Create RN Project
run: |
npx @react-native-community/cli init CompatTest \
--version ${{ matrix.react-native-version }} \
--skip-git-init \
--skip-install

- name: Install Dependencies
working-directory: CompatTest
run: |
npm install
npm install ../sdk/didomi-react-native-*.tgz

- name: Build Android
working-directory: CompatTest/android
run: |
chmod +x ./gradlew
./gradlew assembleDebug --no-daemon

- name: Install Pods
working-directory: CompatTest/ios
run: pod install

- name: Build iOS
working-directory: CompatTest/ios
run: |
xcodebuild build \
-workspace CompatTest.xcworkspace \
-scheme CompatTest \
-sdk iphonesimulator \
-destination "platform=iOS Simulator,name=iPhone 16" \
CODE_SIGNING_ALLOWED=NO
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ DerivedData
*.xcuserstate
**/.xcode.env.local

# VSCode
#
.vscode/

# Android/IntelliJ
#
build/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
},
"peerDependencies": {
"react": "*",
"react-native": "*"
"react-native": ">=0.77.0"
},
"jest": {
"preset": "react-native",
Expand Down
2 changes: 1 addition & 1 deletion sample/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
# your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=true
newArchEnabled=false

# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ open class BaseUITest {
onView(matcher).perform(ScrollToAction(), click())
}

private fun scrollToItem(name: String) {
protected fun scrollToItem(name: String) {
val matcher = withText(name.uppercase())
onView(matcher).perform(ScrollToAction())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ class UIMethodsTest : BaseUITest() {

@Test
fun test_HidePreferences() {
scrollToItem("showPreferences Purposes") // Scroll to the next item to be able to check button's status
testMethodCall("hidePreferences")
testLastEvent("on_hide_preferences")
}

@Test
Expand Down