6
6
- main
7
7
pull_request :
8
8
9
+ env :
10
+ XCODE_VERSION : 15.1
11
+ IOS_DESTINATION : platform=iOS Simulator,OS=17.2,name=iPad (10th generation)
12
+
9
13
jobs :
10
14
development-apps :
11
15
runs-on : macos-latest
@@ -24,90 +28,96 @@ jobs:
24
28
- Development-Unit-WorkflowRxSwiftTestingTests
25
29
26
30
steps :
27
- - uses : actions/checkout@v3
31
+ - uses : actions/checkout@v4
28
32
29
- - name : Cache gems
30
- uses : actions/cache@v3
33
+ - name : Setup Ruby
34
+ uses : ruby/setup-ruby@v1
31
35
with :
32
- path : .bundle
33
- key : gems-${{ hashFiles('Gemfile.lock') }}
34
-
35
- - name : Bundle Install
36
- run : |
37
- bundle check || bundle install --path .bundle
36
+ # Uses version specified in .ruby_version
37
+ bundler-cache : true # runs 'bundle install' and caches installed gems automatically
38
38
39
39
- name : Pod Install
40
40
run : |
41
41
bundle exec pod gen Development.podspec
42
42
43
43
- name : Switch Xcode
44
- run : sudo xcode-select -s /Applications/Xcode_14.2.0 .app
44
+ run : sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION} .app
45
45
46
46
- name : Build & Test
47
47
run : |
48
- set -o pipefail && xcodebuild -workspace gen/Development/Development.xcworkspace -scheme ${{ matrix.scheme }} -destination platform\=iOS\ Simulator,OS\=16.2,name\=iPad\ Pro\ \(9.7-inch\) build test | xcpretty
48
+ set -o pipefail
49
+ xcodebuild \
50
+ -workspace gen/Development/Development.xcworkspace \
51
+ -scheme ${{ matrix.scheme }} \
52
+ -destination "$IOS_DESTINATION" \
53
+ build test | bundle exec xcpretty
49
54
50
55
spm :
51
56
runs-on : macos-latest
52
57
53
58
steps :
54
- - uses : actions/checkout@v3
59
+ - uses : actions/checkout@v4
55
60
56
61
- name : Switch Xcode
57
- run : sudo xcode-select -s /Applications/Xcode_14.2.0 .app
62
+ run : sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION} .app
58
63
59
64
- name : Swift Package Manager - iOS
60
65
run : |
61
- xcodebuild -scheme "Workflow-Package" test -destination "name=iPhone 11"
66
+ xcodebuild \
67
+ -scheme "Workflow-Package" \
68
+ -destination "$IOS_DESTINATION" \
69
+ test
62
70
63
71
- name : Swift Package Manager - macOS
64
72
run : |
65
- xcodebuild -scheme "Workflow-Package" test -destination "platform=macOS"
73
+ xcodebuild \
74
+ -scheme "Workflow-Package" \
75
+ -destination "platform=macOS" \
76
+ test
66
77
67
78
tutorial :
68
79
runs-on : macos-latest
69
80
70
81
steps :
71
- - uses : actions/checkout@v3
82
+ - uses : actions/checkout@v4
72
83
73
- - name : Cache gems
74
- uses : actions/cache@v3
84
+ - name : Setup Ruby
85
+ uses : ruby/setup-ruby@v1
75
86
with :
76
- path : .bundle
77
- key : gems-${{ hashFiles('Gemfile.lock') }}
78
-
79
- - name : Bundle Install
80
- run : |
81
- bundle check || bundle install --path .bundle
87
+ # Uses version specified in .ruby_version
88
+ bundler-cache : true # runs 'bundle install' and caches installed gems automatically
82
89
83
90
- name : Switch Xcode
84
- run : sudo xcode-select -s /Applications/Xcode_14.2.0 .app
91
+ run : sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION} .app
85
92
86
93
- name : Tutorial App
87
94
run : |
88
95
cd Samples/Tutorial
89
96
bundle exec pod install
90
- set -o pipefail && xcodebuild -workspace Tutorial.xcworkspace -scheme Tutorial -destination platform\=iOS\ Simulator,OS\=16.2,name\=iPad\ Pro\ \(9.7-inch\) build test | xcpretty
97
+ set -o pipefail
98
+ xcodebuild \
99
+ -workspace Tutorial.xcworkspace \
100
+ -scheme Tutorial \
101
+ -destination "$IOS_DESTINATION" \
102
+ build test | bundle exec xcpretty
91
103
92
104
documentation-lint :
93
105
runs-on : macos-latest
94
106
95
107
steps :
96
- - uses : actions/checkout@v3
108
+ - uses : actions/checkout@v4
97
109
98
- - name : Cache gems
99
- uses : actions/cache@v3
110
+ - name : Setup Ruby
111
+ uses : ruby/setup-ruby@v1
100
112
with :
101
- path : .bundle
102
- key : gems-${{ hashFiles('Gemfile.lock') }}
103
-
104
- - name : Bundle Install
105
- run : |
106
- bundle check || bundle install --path .bundle
107
- brew install sourcedocs
113
+ # Uses version specified in .ruby_version
114
+ bundler-cache : true # runs 'bundle install' and caches installed gems automatically
108
115
109
116
- name : Switch Xcode
110
- run : sudo xcode-select -s /Applications/Xcode_14.2.0.app
117
+ run : sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app
118
+
119
+ - name : Install sourcedocs
120
+ run : brew install sourcedocs
111
121
112
122
- name : Swiftdocs
113
123
run : |
0 commit comments