File tree 3 files changed +30
-25
lines changed
3 files changed +30
-25
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 13
13
14
14
steps :
15
15
- name : Checkout Repository
16
- uses : actions/checkout@v3
17
- - name : Install
18
- run : pod install
16
+ uses : actions/checkout@v4
19
17
- name : Build
20
- run : xcodebuild build-for-testing -workspace grid-ios.xcworkspace -scheme grid-ios -destination 'platform=iOS Simulator,OS=latest,name=iPhone 16'
18
+ run : |
19
+ iphone_names=$(xcrun simctl list devices available --json | jq -r '.devices | to_entries[] | .value[] | select(.name | test("^iPhone [0-9]+")) | .name')
20
+ latest_iphone=$(echo "$iphone_names" | sort | tail -n 1)
21
+ echo "latest_iphone: $latest_iphone"
22
+ xcodebuild build -scheme Grid -destination "platform=iOS Simulator,OS=latest,name=$latest_iphone"
23
+
24
+ - name : Test
25
+ run : |
26
+ iphone_names=$(xcrun simctl list devices available --json | jq -r '.devices | to_entries[] | .value[] | select(.name | test("^iPhone [0-9]+")) | .name')
27
+ latest_iphone=$(echo "$iphone_names" | sort | tail -n 1)
28
+ echo "latest_iphone: $latest_iphone"
29
+ xcodebuild test -scheme Grid -destination "platform=iOS Simulator,OS=latest,name=$latest_iphone"
30
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ # Find iPhone Simulator
6
+ iphone_names=$( xcrun simctl list devices available --json | jq -r ' .devices | to_entries[] | .value[] | select(.name | test("^iPhone [0-9]+")) | .name' )
7
+ if [ -z " $iphone_names " ]; then echo " Error: No iPhone simulators found." ; exit 1; fi
8
+
9
+ latest_iphone=$( echo " $iphone_names " | sort | tail -n 1)
10
+ echo " latest_iphone: $latest_iphone "
11
+
12
+ # Build
13
+ xcodebuild build -scheme Grid -destination " platform=iOS Simulator,OS=latest,name=$latest_iphone "
14
+
15
+ # Test
16
+ xcodebuild test -scheme Grid -destination " platform=iOS Simulator,OS=latest,name=$latest_iphone "
You can’t perform that action at this time.
0 commit comments