Skip to content

Commit 5360b9d

Browse files
committed
test(ci, ios): build/run in release mode in CI in addition to debug
- note that you still need the packager started, auth tests use a continueUrl that hits 8081, and tests will fail if the port refuses connection
1 parent 6cf834c commit 5360b9d

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

.github/workflows/tests_e2e_ios.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ jobs:
3232
timeout-minutes: 60
3333
env:
3434
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
# We want to test debug (for coverage) and release mode
39+
buildmode: [debug, release]
3540
steps:
3641
# Set up tool versions
3742
- uses: actions/setup-node@v4
@@ -78,7 +83,7 @@ jobs:
7883
- uses: hendrikmuhs/ccache-action@v1
7984
name: Xcode Compile Cache
8085
with:
81-
key: ${{ runner.os }}-ios-v3 # makes a unique key w/related restore key internally
86+
key: ${{ runner.os }}-${{ matrix.buildmode }}-ios-v3 # makes a unique key w/related restore key internally
8287
create-symlink: true
8388
max-size: 1500M
8489

@@ -144,7 +149,8 @@ jobs:
144149
max_attempts: 3
145150
command: HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew && HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils xcbeautify
146151

147-
- name: Build iOS App
152+
- name: Build iOS App Debug
153+
if: contains(matrix.buildmode, 'debug')
148154
run: |
149155
export CCACHE_SLOPPINESS=clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros
150156
export CCACHE_FILECLONE=true
@@ -161,6 +167,23 @@ jobs:
161167
ccache -s
162168
shell: bash
163169

170+
- name: Build iOS App Release
171+
if: contains(matrix.buildmode, 'release')
172+
run: |
173+
export CCACHE_SLOPPINESS=clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros
174+
export CCACHE_FILECLONE=true
175+
export CCACHE_DEPEND=true
176+
export CCACHE_INODECACHE=true
177+
export CCACHE_LIMIT_MULTIPLE=0.95
178+
ccache -s
179+
export RCT_NO_LAUNCH_PACKAGER=1
180+
set -o pipefail
181+
echo $PATH
182+
which clang
183+
yarn tests:ios:build:release
184+
ccache -s
185+
shell: bash
186+
164187
- name: Metro Bundler Cache
165188
uses: actions/cache@v4
166189
with:
@@ -192,9 +215,15 @@ jobs:
192215
run: nohup sh -c "sleep 110 && xcrun simctl spawn booted log stream --level debug --style compact > simulator.log 2>&1 &"
193216

194217
- name: Detox Test
218+
if: contains(matrix.buildmode, 'debug')
195219
timeout-minutes: 50
196220
run: yarn tests:ios:test-cover
197221

222+
- name: Detox Test
223+
if: contains(matrix.buildmode, 'release')
224+
timeout-minutes: 50
225+
run: yarn tests:ios:test:release
226+
198227
- name: Stop App Video
199228
if: always()
200229
continue-on-error: true
@@ -205,16 +234,17 @@ jobs:
205234
continue-on-error: true
206235
if: always()
207236
with:
208-
name: simulator_video
237+
name: simulator-${{ matrix.buildmode }}_video
209238
path: simulator.mp4
210239

211240
- name: Upload Simulator Log
212241
uses: actions/upload-artifact@v4
213242
if: always()
214243
with:
215-
name: simulator_log
244+
name: simulator-${{ matrix.buildmode }}_log
216245
path: simulator.log
217246

218247
- uses: codecov/codecov-action@v4
248+
if: contains(matrix.buildmode, 'debug')
219249
with:
220250
verbose: true

0 commit comments

Comments
 (0)