1212 - " Package.swift"
1313 - " Source/**"
1414 - " Tests/**"
15+
1516jobs :
16- SwiftLint :
17- runs-on : ubuntu-latest
17+ macOS :
18+ name : ${{ matrix.name }}
19+ runs-on : ${{ matrix.runsOn }}
20+ env :
21+ DEVELOPER_DIR : " /Applications/${{ matrix.xcode }}.app/Contents/Developer"
22+ timeout-minutes : 20
23+ strategy :
24+ fail-fast : false
25+ matrix :
26+ include :
27+ - xcode : " Xcode_16.0"
28+ runsOn : macOS-14
29+ name : " macOS 14, Xcode 16.0, Swift 6.0"
30+ - xcode : " Xcode_15.4"
31+ runsOn : macOS-14
32+ name : " macOS 14, Xcode 15.4, Swift 5.10"
33+ - xcode : " Xcode_15.0"
34+ runsOn : macos-13
35+ name : " macOS 13, Xcode 15.0, Swift 5.9.0"
36+ - xcode : " Xcode_14.3.1"
37+ runsOn : macos-13
38+ name : " macOS 13, Xcode 14.3.1, Swift 5.8.0"
39+ steps :
40+ - uses : actions/checkout@v4
41+ - name : ${{ matrix.name }}
42+ run : xcodebuild test -scheme "NetworkLayer" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
43+ - name : Upload test coverage reports to Codecov
44+ uses : space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
45+ with :
46+ scheme_name : NetworkLayer
47+ filename : ${{ matrix.name }}
48+ token : ${{ secrets.CODECOV_TOKEN }}
49+
50+ iOS :
51+ name : ${{ matrix.name }}
52+ runs-on : ${{ matrix.runsOn }}
53+ env :
54+ DEVELOPER_DIR : " /Applications/${{ matrix.xcode }}.app/Contents/Developer"
55+ timeout-minutes : 20
56+ strategy :
57+ fail-fast : false
58+ matrix :
59+ include :
60+ - destination : " OS=18.1,name=iPhone 16 Pro"
61+ name : " iOS 18.1"
62+ xcode : " Xcode_16.1"
63+ runsOn : macOS-14
64+ - destination : " OS=18.0,name=iPhone 16 Pro"
65+ name : " iOS 18.0"
66+ xcode : " Xcode_16.0"
67+ runsOn : macOS-14
68+ - destination : " OS=17.5,name=iPhone 15 Pro"
69+ name : " iOS 17.5"
70+ xcode : " Xcode_15.4"
71+ runsOn : macOS-14
72+ - destination : " OS=17.0.1,name=iPhone 14 Pro"
73+ name : " iOS 17.0.1"
74+ xcode : " Xcode_15.0"
75+ runsOn : macos-13
76+ - destination : " OS=16.4,name=iPhone 14 Pro"
77+ name : " iOS 16.4"
78+ xcode : " Xcode_14.3.1"
79+ runsOn : macos-13
80+ steps :
81+ - uses : actions/checkout@v4
82+ - name : ${{ matrix.name }}
83+ run : xcodebuild test -scheme "NetworkLayer" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
84+ - name : Upload test coverage reports to Codecov
85+ uses : space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
86+ with :
87+ scheme_name : NetworkLayer
88+ filename : ${{ matrix.name }}
89+ token : ${{ secrets.CODECOV_TOKEN }}
90+
91+ tvOS :
92+ name : ${{ matrix.name }}
93+ runs-on : ${{ matrix.runsOn }}
94+ env :
95+ DEVELOPER_DIR : " /Applications/${{ matrix.xcode }}.app/Contents/Developer"
96+ timeout-minutes : 20
97+ strategy :
98+ fail-fast : false
99+ matrix :
100+ include :
101+ - destination : " OS=18.1,name=Apple TV"
102+ name : " tvOS 18.1"
103+ xcode : " Xcode_16.1"
104+ runsOn : macOS-14
105+ - destination : " OS=18.0,name=Apple TV"
106+ name : " tvOS 18.0"
107+ xcode : " Xcode_16.0"
108+ runsOn : macOS-14
109+ - destination : " OS=17.5,name=Apple TV"
110+ name : " tvOS 17.5"
111+ xcode : " Xcode_15.4"
112+ runsOn : macOS-14
113+ - destination : " OS=17.0,name=Apple TV"
114+ name : " tvOS 17.0"
115+ xcode : " Xcode_15.0"
116+ runsOn : macos-13
117+ - destination : " OS=16.4,name=Apple TV"
118+ name : " tvOS 16.4"
119+ xcode : " Xcode_14.3.1"
120+ runsOn : macos-13
18121 steps :
19- - uses : actions/checkout@v3
20- - name : GitHub Action for SwiftLint
21- uses : norio-nomura/action-swiftlint@3.2.1
122+ - uses : actions/checkout@v4
123+ - name : ${{ matrix.name }}
124+ run : xcodebuild test -scheme "NetworkLayer" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
125+ - name : Upload test coverage report to Codecov
126+ uses : space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
22127 with :
23- args : --strict
24- env :
25- DIFF_BASE : ${{ github.base_ref }}
26- Latest :
27- name : Test Latest (iOS, macOS, tvOS, watchOS)
28- runs-on : macOS-12
128+ scheme_name : NetworkLayer
129+ filename : ${{ matrix.name }}
130+ token : ${{ secrets.CODECOV_TOKEN }}
131+
132+ watchOS :
133+ name : ${{ matrix.name }}
134+ runs-on : ${{ matrix.runsOn }}
29135 env :
30- DEVELOPER_DIR : " /Applications/Xcode_14.1 .app/Contents/Developer"
31- timeout-minutes : 10
136+ DEVELOPER_DIR : " /Applications/${{ matrix.xcode }} .app/Contents/Developer"
137+ timeout-minutes : 20
32138 strategy :
33139 fail-fast : false
34140 matrix :
35141 include :
36- - destination : " OS=16.1,name=iPhone 14 Pro"
37- name : " iOS"
38- scheme : " NetworkLayer"
39- sdk : iphonesimulator
40- - destination : " OS=16.1,name=Apple TV"
41- name : " tvOS"
42- scheme : " NetworkLayer"
43- sdk : appletvsimulator
44- - destination : " OS=9.1,name=Apple Watch Series 8 (45mm)"
45- name : " watchOS"
46- scheme : " NetworkLayer"
47- sdk : watchsimulator
48- - destination : " platform=macOS"
49- name : " macOS"
50- scheme : " NetworkLayer"
51- sdk : macosx
142+ - destination : " OS=11.1,name=Apple Watch Series 10 (46mm)"
143+ name : " watchOS 11.1"
144+ xcode : " Xcode_16.1"
145+ runsOn : macOS-14
146+ - destination : " OS=11.0,name=Apple Watch Series 10 (46mm)"
147+ name : " watchOS 11.0"
148+ xcode : " Xcode_16.0"
149+ runsOn : macOS-14
150+ - destination : " OS=10.5,name=Apple Watch Series 9 (45mm)"
151+ name : " watchOS 10.5"
152+ xcode : " Xcode_15.4"
153+ runsOn : macOS-14
154+ - destination : " OS=10.0,name=Apple Watch Series 9 (45mm)"
155+ name : " watchOS 10.0"
156+ xcode : " Xcode_15.0"
157+ runsOn : macos-13
158+ - destination : " OS=9.4,name=Apple Watch Series 8 (45mm)"
159+ name : " watchOS 9.4"
160+ xcode : " Xcode_14.3.1"
161+ runsOn : macos-13
52162 steps :
53- - uses : actions/checkout@v3
163+ - uses : actions/checkout@v4
54164 - name : ${{ matrix.name }}
55- run : xcodebuild test -scheme "${{ matrix.scheme }} " -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath ". /${{ matrix.sdk }}.xcresult"
56- - name : Upload coverage reports to Codecov
57- uses : codecov/codecov-action@v3.1.0
165+ run : xcodebuild test -scheme "NetworkLayer " -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output /${{ matrix.name }}.xcresult" || exit 1
166+ - name : Upload test coverage reports to Codecov
167+ uses : space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
58168 with :
169+ scheme_name : NetworkLayer
170+ filename : ${{ matrix.name }}
59171 token : ${{ secrets.CODECOV_TOKEN }}
60- xcode : true
61- xcode_archive_path : " ./${{ matrix.sdk }}.xcresult"
62-
172+
173+ spm :
174+ name : ${{ matrix.name }}
175+ runs-on : ${{ matrix.runsOn }}
176+ env :
177+ DEVELOPER_DIR : " /Applications/${{ matrix.xcode }}.app/Contents/Developer"
178+ timeout-minutes : 20
179+ strategy :
180+ fail-fast : false
181+ matrix :
182+ include :
183+ - name : " macOS 14, SPM 6.0.2 Test"
184+ xcode : " Xcode_16.1"
185+ runsOn : macOS-14
186+ - name : " macOS 14, SPM 6.0.0 Test"
187+ xcode : " Xcode_16.0"
188+ runsOn : macOS-14
189+ - name : " macOS 14, SPM 5.9.0 Test"
190+ xcode : " Xcode_15.0"
191+ runsOn : macos-14
192+ - name : " macOS 13, SPM 5.8.1 Test"
193+ xcode : " Xcode_14.3.1"
194+ runsOn : macos-13
195+ steps :
196+ - uses : actions/checkout@v4
197+ - name : ${{ matrix.name }}
198+ run : swift build -c release --target NetworkLayer
199+
200+ merge-test-reports :
201+ needs : [iOS, macOS, watchOS, tvOS]
202+ runs-on : macos-13
203+ steps :
204+ - name : Download artifacts
205+ uses : actions/download-artifact@v4
206+ with :
207+ path : test_output
208+ - run : xcrun xcresulttool merge test_output/**/*.xcresult --output-path test_output/final/final.xcresult
209+ - name : Upload Merged Artifact
210+ uses : actions/upload-artifact@v4
211+ with :
212+ name : MergedResult
213+ path : test_output/final
214+
215+ discover-typos :
216+ name : Discover Typos
217+ runs-on : macOS-13
218+ env :
219+ DEVELOPER_DIR : /Applications/Xcode_14.1.app/Contents/Developer
220+ steps :
221+ - uses : actions/checkout@v4
222+ - name : Discover typos
223+ run : |
224+ export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"
225+ python3 -m pip install --upgrade pip
226+ python3 -m pip install codespell
227+ codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*"
0 commit comments