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
11 changes: 11 additions & 0 deletions js/react_native/e2e/.detoxrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ module.exports = {
os: 'iOS 17.4',
},
},
simulator_ios_18_6: {
type: 'ios.simulator',
device: {
type: 'iPhone 16',
os: 'iOS 18.6',
},
},
attached: {
type: 'android.attached',
device: {
Expand All @@ -64,6 +71,10 @@ module.exports = {
device: 'simulator',
app: 'ios.release',
},
'ios.sim_18_6.release': {
device: 'simulator_ios_18_6',
app: 'ios.release',
},
'android.att.debug': {
device: 'attached',
app: 'android.debug',
Expand Down
53 changes: 32 additions & 21 deletions tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ stages:
python $(Build.SourcesDirectory)/tools/ci_build/github/apple/build_and_assemble_apple_pods.py \
--build-dir "$(Build.BinariesDirectory)/ios_framework_full" \
--staging-dir "$(Build.BinariesDirectory)/ios_pod" \
--build-settings-file $(Build.SourcesDirectory)/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings.json
--build-settings-file $(Build.SourcesDirectory)/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings_arm64.json
displayName: Build iOS package and assemble pods

- task: 1ES.PublishPipelineArtifact@1
Expand Down Expand Up @@ -122,31 +122,42 @@ stages:
- template: ../stages/jobs/steps/react-native-bootstrap-steps.yml

- script: |
ORT_C_LOCAL_POD_PATH=$(Build.BinariesDirectory)/ios_pod/onnxruntime-c \
pod install
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/ios'
brew tap wix/brew
brew install applesimutils
displayName: Install applesimutils

- script: |
gem install securerandom -v 0.3.2 --user-install --force
gem install drb -v 2.0.6 --user-install --force
gem install zeitwerk -v 2.6.18 --user-install --force
gem install activesupport -v 6.0.6.1 --user-install --force
gem install ffi -v 1.15.5 --user-install --force
gem install cocoapods -v 1.11.3 --user-install --force
displayName: Install CocoaPods

- script: |
set -e -x
export PATH=$HOME/.gem/ruby/2.6.0/bin:$PATH
export LANG=en_US.UTF-8
ORT_C_LOCAL_POD_PATH=$(Build.BinariesDirectory)/ios_pod/onnxruntime-c pod install --verbose
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/e2e/ios'
displayName: Pod install for onnxruntime react native ios bridge library

# Run unit tests on iOS simulator
- task: Xcode@5
inputs:
actions: 'test'
configuration: 'Debug'
sdk: 'iphonesimulator'
xcWorkspacePath: '$(Build.SourcesDirectory)/js/react_native/ios/OnnxruntimeModule.xcworkspace'
scheme: 'OnnxruntimeModuleTest'
packageApp: false
destinationPlatformOption: 'iOS'
destinationSimulators: 'iPhone 15,OS=17.4'
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/ios'
xcprettyArgs: '--output build/reports/test-results.xml'
publishJUnitResults: true
testRunTitle: 'React Native iOS Instrumented Test Results'
displayName: Run React Native iOS Instrumented Tests
- script: |
xcrun simctl list runtimes
xcrun simctl list devices
detox build --configuration ios.sim_18_6.release
JEST_JUNIT_OUTPUT_FILE=$(Build.SourcesDirectory)/js/react_native/e2e/ios-test-results.xml \
detox test --record-logs all \
--configuration ios.sim_18_6.release \
--loglevel verbose \
--take-screenshots failing
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/e2e'
displayName: Build and Run Detox iOS e2e Tests

- task: PublishTestResults@2
inputs:
testResultsFiles: '$(Build.SourcesDirectory)/js/react_native/ios/build/reports/test-results.xml'
testResultsFiles: '$(Build.SourcesDirectory)/js/react_native/e2e/ios-test-results.xml'
failTaskOnFailedTests: true
testRunTitle: 'React Native iOS Instrumented Test results'
condition: succeededOrFailed()
Expand Down
Loading