@@ -3,7 +3,7 @@ version: 2.1
33# Default VM config to be used for macOS builds
44macos_config : &macos_config
55 macos :
6- xcode : 15.3 .0
6+ xcode : 16.0 .0
77 resource_class : macos.m1.large.gen1
88 shell : /bin/bash --login -eo pipefail
99
@@ -20,7 +20,8 @@ executors:
2020 working_directory : ~/project
2121
2222orbs :
23- android : circleci/android@1.0
23+ android : circleci/android@2.4.0
24+ node : circleci/node@5.1.0
2425
2526# Always run job
2627run_always : &run_always
@@ -54,18 +55,14 @@ jobs:
5455 name : Install dependencies
5556 command : |
5657 corepack enable
57- yarn install --cwd example
58- yarn install --cwd example/e2e
59- yarn install
58+ yarn install --cwd example --ignore-engines
59+ yarn install --ignore-engines
6060 - save_cache :
6161 key : dependencies-{{ checksum "package.json" }}
6262 paths : node_modules
6363 - save_cache :
6464 key : dependencies-example-{{ checksum "example/package.json" }}
6565 paths : example/node_modules
66- - save_cache :
67- key : dependencies-example-e2e-{{ checksum "example/package.json" }}
68- paths : example/e2e/node_modules
6966 - persist_to_workspace :
7067 root : .
7168 paths : .
@@ -115,18 +112,25 @@ jobs:
115112 JAVA_OPTS : ' -Xms512m -Xmx1024m'
116113 executor :
117114 name : android/android-machine
115+ tag : default
118116 working_directory : ~/project
119117 steps :
120118 - checkout :
121119 path : ~/project
120+ - node/install :
121+ node-version : 18.17.0
122122
123123 - attach_workspace :
124124 at : ~/project
125125
126126 - << : *setup_env_file
127127
128128 - run :
129- working_directory : example/e2e
129+ name : Install Maestro
130+ command : curl -Ls "https://get.maestro.mobile.dev" | bash
131+
132+ - run :
133+ working_directory : example/test
130134 name : Build android
131135 command : npm run build:android
132136
@@ -141,10 +145,19 @@ jobs:
141145 post-emulator-launch-assemble-command : echo Emulator Started
142146
143147 - run :
144- working_directory : example/e2e
148+ name : Install app on emulator
149+ command : |
150+ adb install -r ~/project/example/android/app/build/outputs/apk/release/app-release.apk
151+
152+ - run :
153+ working_directory : example/test
145154 name : Run UI Tests
146155 command : npm run test:android
147156
157+ - store_artifacts :
158+ path : ~/.maestro/tests
159+ destination : maestro-tests
160+
148161 # Build the Test App used for UI Testing and save is to the workspace. This allows it to be used by other jobs.
149162 ios-e2e-test :
150163 << : *macos_config
@@ -155,28 +168,49 @@ jobs:
155168
156169 - << : *setup_env_file
157170
171+ - run :
172+ working_directory : example/e2e
173+ name : Install Maestro
174+ command : curl -Ls "https://get.maestro.mobile.dev" | bash
175+
158176 - restore_cache :
159177 keys :
160178 - pod-dependencies-{{ checksum "~/project/example/ios/Podfile" }}
161179 - run :
162180 working_directory : example/ios
163181 name : Install Pods
164182 command : pod install
183+
165184 - save_cache :
166185 key : pod-dependencies-{{ checksum "~/project/example/ios/Podfile" }}
167186 paths :
168187 - ~/project/example/ios/Pods
169188
170189 - run :
171- working_directory : example/e2e
190+ working_directory : example/test
172191 name : Build
173192 command : npm run build:ios
174193
175194 - run :
176- working_directory : example/e2e
195+ name : Create and boot iPhone 15 simulator
196+ command : |
197+ echo "Creating iPhone 15 simulator with runtime $RUNTIME"
198+ xcrun simctl create "iPhone 15" com.apple.CoreSimulator.SimDeviceType.iPhone-15 $RUNTIME
199+ xcrun simctl boot "iPhone 15" || true
200+
201+ - run :
202+ name : Install app on simulator
203+ command : |
204+ xcrun simctl install booted ~/project/example/test/build/Build/Products/Release-iphonesimulator/IntercomReactNativeExampleUI.app
205+
206+ - run :
207+ working_directory : example/test
177208 name : Run UI Tests
178209 command : npm run test:ios
179210
211+ - store_artifacts :
212+ path : ~/.maestro/tests
213+ destination : maestro-tests
180214
181215 release-to-npm :
182216 executor : default
@@ -195,7 +229,7 @@ jobs:
195229 - run :
196230 name : Install dependencies
197231 command : |
198- yarn install
232+ yarn install --ignore-engines
199233
200234 - run :
201235 name : Publish the package
@@ -224,6 +258,7 @@ workflows:
224258 << : *run_always
225259 requires :
226260 - install-dependencies
261+ # Temporarily disabled Maestro e2e tests
227262 # - android-e2e-test:
228263 # <<: *run_always
229264 # requires:
@@ -240,6 +275,7 @@ workflows:
240275 # - typescript
241276 # - unit-tests
242277 # - build-package
278+
243279 - release-to-npm :
244280 << : *run_on_release
245281 context :
@@ -250,5 +286,6 @@ workflows:
250286 - typescript
251287 - unit-tests
252288 - build-package
289+ # Temporarily removed e2e test dependencies
253290 # - ios-e2e-test
254291 # - android-e2e-test
0 commit comments