6
6
- ci
7
7
8
8
jobs :
9
- run-tvos- tests :
9
+ run-tests :
10
10
runs-on : macos-latest
11
+ strategy :
12
+ matrix :
13
+ device_model : ['iPhone 8', 'Apple TV 4K']
11
14
steps :
12
15
- uses : actions/checkout@v2
13
16
- uses : maxim-lobanov/setup-xcode@v1
@@ -24,48 +27,16 @@ jobs:
24
27
run : |
25
28
sh ./Consumption-Tests/Shared/carthage.sh bootstrap --cache-builds --use-xcframeworks
26
29
- uses : futureware-tech/simulator-action@v1
27
- id : apple_tv
30
+ id : simulator
28
31
with :
29
- model : ' Apple TV 4K '
30
- - name : " Run tvOS Tests"
32
+ model : ${{ matrix.device_model }}
33
+ - name : " Run ${{ matrix.device_model }} Tests"
31
34
run : |
32
35
set -o pipefail && env NSUnbufferedIO=YES xcodebuild \
33
36
-project PusherSwift.xcodeproj \
34
37
-scheme PusherSwift \
35
38
build \
36
39
COMPILER_INDEX_STORE_ENABLE=NO \
37
40
test \
38
- -destination "id=${{ steps.apple_tv.outputs.udid }}" \
39
- | xcpretty --color
40
-
41
- run-ios-tests :
42
- runs-on : macos-latest
43
- steps :
44
- - uses : actions/checkout@v2
45
- - uses : maxim-lobanov/setup-xcode@v1
46
- name : " Build for testing"
47
- with :
48
- xcode-version : ' 13.2.1'
49
- - uses : actions/cache@v1
50
- id : carthage-cache
51
- with :
52
- path : Carthage
53
- key : ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
54
- - name : Carthage
55
- if : steps.carthage-cache.outputs.cache-hit != 'true'
56
- run : |
57
- sh ./Consumption-Tests/Shared/carthage.sh bootstrap --cache-builds --use-xcframeworks
58
- - uses : futureware-tech/simulator-action@v1
59
- id : iphone_simulator
60
- with :
61
- model : ' iPhone 8'
62
- - name : " Run iOS Tests"
63
- run : |
64
- set -o pipefail && env NSUnbufferedIO=YES xcodebuild \
65
- -project PusherSwift.xcodeproj \
66
- -scheme PusherSwift \
67
- build \
68
- COMPILER_INDEX_STORE_ENABLE=NO \
69
- test \
70
- -destination "id=${{ steps.iphone_simulator.outputs.udid }}" \
41
+ -destination "id=${{ steps.simulator.outputs.udid }}" \
71
42
| xcpretty --color
0 commit comments