Skip to content

Commit ff15ba4

Browse files
authored
test(react-native): Add E2E iOS Tests for React Native (#889)
1 parent f938480 commit ff15ba4

File tree

13 files changed

+936
-1
lines changed

13 files changed

+936
-1
lines changed

.github/workflows/build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
cache: 'yarn'
2323
- name: Install dependencies with yarn
2424
run: yarn install --frozen-lockfile
25+
- name: Apply xcode library patch
26+
run: patch -p1 -i patches/xcode+3.0.1.patch
2527
- name: Build
2628
run: yarn build
2729
- name: Setup Apple Code Signing
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This `.xcode.env` file is versioned and is used to source the environment
2+
# used when running script phases inside Xcode.
3+
# To customize your local environment, you can create an `.xcode.env.local`
4+
# file that is not versioned.
5+
6+
# NODE_BINARY variable contains the PATH to the node executable.
7+
#
8+
# Customize the NODE_BINARY variable here.
9+
# For example, to use nvm with brew, add the following line
10+
# . "$(brew --prefix nvm)/nvm.sh" --no-use
11+
export NODE_BINARY=$(command -v node)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Resolve react_native_pods.rb with node to allow for hoisting
2+
require Pod::Executable.execute_command('node', ['-p',
3+
'require.resolve(
4+
"react-native/scripts/react_native_pods.rb",
5+
{paths: [process.argv[1]]},
6+
)', __dir__]).strip
7+
8+
platform :ios, min_ios_version_supported
9+
prepare_react_native_project!
10+
11+
linkage = ENV['USE_FRAMEWORKS']
12+
if linkage != nil
13+
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
14+
use_frameworks! :linkage => linkage.to_sym
15+
end
16+
17+
target 'reactnative078' do
18+
config = use_native_modules!
19+
20+
use_react_native!(
21+
:path => config[:reactNativePath],
22+
# An absolute path to your application root.
23+
:app_path => "#{Pod::Config.instance.installation_root}/.."
24+
)
25+
26+
post_install do |installer|
27+
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
28+
react_native_post_install(
29+
installer,
30+
config[:reactNativePath],
31+
:mac_catalyst_enabled => false,
32+
# :ccache_enabled => true
33+
)
34+
end
35+
end

0 commit comments

Comments
 (0)