Skip to content

Commit ad33f12

Browse files
committed
test(e2e): enable whole screen and system logging on ios e2e test
also add some continue-on-error's into other, hasn't been a problem, but the steps that will now continue-on-error should not stop the workflow
1 parent 589d398 commit ad33f12

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed

.github/workflows/tests_e2e_ios.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,18 @@ jobs:
101101
fail-fast: false
102102
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
103103
steps:
104+
- name: Setup Environment for Screen Recording
105+
uses: guidepup/setup-action@0.17.3
106+
with:
107+
record: true
108+
109+
- name: Upload Screen Recording Environment Setup
110+
uses: actions/upload-artifact@v4
111+
if: always()
112+
with:
113+
name: screenrecording-setup-${{ matrix.buildmode }}-${{ matrix.iteration }}.mov
114+
path: ./recordings/
115+
104116
# Set up tool versions
105117
- uses: actions/setup-node@v4
106118
with:
@@ -256,10 +268,13 @@ jobs:
256268
curl --output /dev/null --silent --head --fail "http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&inlineSourceMap=true"
257269
echo "...javascript bundle ready"
258270
259-
- name: Record App Video
271+
- name: Start Screen and Simulator Recordings and System Logging
260272
# With a little delay so the detox test below has time to spawn it, missing the first part of boot is fine
261273
continue-on-error: true
262-
run: nohup sh -c "sleep 110 && xcrun simctl io booted recordVideo --codec=h264 -f simulator.mp4 2>&1 &"
274+
run: |
275+
nohup sh -c "sleep 314159265 | screencapture -v -C -k -T0 -g screenrecording.mov > screenrecording.log 2>&1 &"
276+
nohup sh -c "log stream --backtrace --color none --style syslog > syslog.log 2>&1 &"
277+
nohup sh -c "sleep 110 && xcrun simctl io booted recordVideo --codec=h264 -f simulator.mp4 2>&1 &"
263278
264279
- name: Create Simulator Log
265280
# With a little delay so the detox test below has time to spawn it, missing the first part of boot is fine
@@ -277,10 +292,13 @@ jobs:
277292
timeout-minutes: 50
278293
run: yarn tests:ios:test:release
279294

280-
- name: Stop App Video
295+
- name: Stop Screen and App Video and System Logging
281296
if: always()
282297
continue-on-error: true
283-
run: killall -INT simctl
298+
run: |
299+
killall -int simctl
300+
killall -int screencapture
301+
killall -int log
284302
285303
- name: Upload App Video
286304
uses: actions/upload-artifact@v4
@@ -292,12 +310,22 @@ jobs:
292310

293311
- name: Upload Simulator Log
294312
uses: actions/upload-artifact@v4
313+
continue-on-error: true
295314
if: always()
296315
with:
297316
name: simulator-${{ matrix.buildmode }}-${{ matrix.iteration }}_log
298317
path: simulator.log
299318

319+
- name: Upload Screen Recording
320+
uses: actions/upload-artifact@v4
321+
continue-on-error: true
322+
if: always()
323+
with:
324+
name: screenrecording-${{ matrix.buildmode }}-${{ matrix.iteration }}
325+
path: screenrecording.*
326+
300327
- uses: codecov/codecov-action@v5
301328
if: contains(matrix.buildmode, 'debug')
329+
continue-on-error: true
302330
with:
303331
verbose: true

.github/workflows/tests_e2e_other.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,31 +244,36 @@ jobs:
244244
run: yarn tests:macos:test-cover
245245

246246
- uses: codecov/codecov-action@v5
247+
continue-on-error: true
247248
with:
248249
verbose: true
249250

250251
- name: Stop Screen Recording and System Logging
252+
continue-on-error: true
251253
if: always()
252254
run: |
253255
killall -int screencapture
254256
killall -int log
255257
256258
- name: Upload Metro Log
257259
uses: actions/upload-artifact@v4
260+
continue-on-error: true
258261
if: always()
259262
with:
260263
name: metro-${{ matrix.iteration }}_log
261264
path: metro.log
262265

263266
- name: Upload Screen Recording
264267
uses: actions/upload-artifact@v4
268+
continue-on-error: true
265269
if: always()
266270
with:
267271
name: screenrecording-${{ matrix.iteration }}
268272
path: screenrecording.*
269273

270274
- name: Upload System Log
271275
uses: actions/upload-artifact@v4
276+
continue-on-error: true
272277
if: always()
273278
with:
274279
name: syslog-${{ matrix.iteration }}

0 commit comments

Comments
 (0)