-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (75 loc) · 3.16 KB
/
ios.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: iOS tests
on:
push:
branches: [ "main", "parallel-testing" ]
pull_request:
jobs:
parallel-testing:
name: Cloned simulator
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install mint and xcbeautify
run: |
brew install mint
brew install xcbeautify
- name: Install lib cli
run: |
mint install BrunoMazzo/UIUnitTest@parallel-testing --force
- name: Select Xcode version
run: sudo xcode-select -switch '/Applications/Xcode_14.3.1.app'
- name: Build & Test
env:
scheme: 'Client'
platform: ${{ 'iOS Simulator' }}
timeout-minutes: 20
run: |
# Debug device list
xcrun xctrace list devices
xcrun simctl list
# xcrun simctl --set testing list
# Get iPhone 14 iOS 16.4 UUID
deviceUUID=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone 14.*\(16\.4\).*' | grep -oE '([[A-F0-9]{4}\-?)*' | head -1 `
# mint run BrunoMazzo/UIUnitTest@parallel-testing stop-command
# mint run BrunoMazzo/UIUnitTest@parallel-testing start-server-command --device-identifier "${deviceUUID}" --device-name "iPhone 14" --os-version "16.4"
# mint run BrunoMazzo/UIUnitTest@parallel-testing monitor-for-new-devices-command --device-name "iPhone 14" --os-version "16.4" --verbose &
#run UIUnitTest server
set -o pipefail && NSUnbufferedIO=YES xcodebuild -project Client/Client.xcodeproj -scheme Client -sdk 'iphonesimulator' -destination "platform=iOS Simulator,id=$deviceUUID" -parallel-testing-enabled YES -parallel-testing-worker-count 2 test 2>&1 | xcbeautify --renderer github-actions
# - name: Archive cli logs
# if: always()
# uses: actions/upload-artifact@v3
# with:
# name: cli-logs-clone-simulator
# path: Client/logfile.txt
single-device-testing:
name: Normal simulator
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install mint and xcbeautify
run: |
brew install mint
brew install xcbeautify
- name: Select Xcode version
run: sudo xcode-select -switch '/Applications/Xcode_14.3.1.app'
- name: Install lib cli
run: |
mint install BrunoMazzo/UIUnitTest@parallel-testing --force
- name: Build & Test
env:
scheme: 'Client'
platform: ${{ 'iOS Simulator' }}
timeout-minutes: 20
run: |
# Get iPhone 14 iOS 16.4 UUID
deviceUUID=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone 14.*\(16\.4\).*' | grep -oE '([[A-F0-9]{4}\-?)*' | head -1 `
#run UIUnitTest server
set -o pipefail && NSUnbufferedIO=YES xcodebuild -project Client/Client.xcodeproj -scheme Client -sdk 'iphonesimulator' -destination "platform=iOS Simulator,id=$deviceUUID" test 2>&1 | xcbeautify --renderer github-actions
# - name: Archive cli logs
# if: always()
# uses: actions/upload-artifact@v3
# with:
# name: cli-logs-single-simulator
# path: Client/logfile.txt