1+ name : " pulse"
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - dev
8+ pull_request :
9+ paths :
10+ - ' .swiftlint.yml'
11+ - " .github/workflows/**"
12+ - " Package.swift"
13+ - " Source/**"
14+ - " Tests/**"
15+
16+ jobs :
17+ SwiftLint :
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v3
21+ - name : GitHub Action for SwiftLint
22+ uses :
norio-nomura/[email protected] 23+ with :
24+ args : --strict
25+ env :
26+ DIFF_BASE : ${{ github.base_ref }}
27+
28+ macOS :
29+ name : ${{ matrix.name }}
30+ runs-on : ${{ matrix.runsOn }}
31+ env :
32+ DEVELOPER_DIR : " /Applications/${{ matrix.xcode }}.app/Contents/Developer"
33+ timeout-minutes : 20
34+ strategy :
35+ fail-fast : false
36+ matrix :
37+ include :
38+ - xcode : " Xcode_16.1"
39+ runsOn : macOS-14
40+ name : " macOS 14, SPM 6.0.2 Test"
41+ steps :
42+ - uses : actions/checkout@v3
43+ - name : ${{ matrix.name }}
44+ run : xcodebuild test -scheme "pulse" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
45+ - name : Upload test coverage reports to Codecov
46+ uses : space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
47+ with :
48+ scheme_name : Pulse
49+ filename : ${{ matrix.name }}
50+ token : ${{ secrets.CODECOV_TOKEN }}
51+
52+ iOS :
53+ name : ${{ matrix.name }}
54+ runs-on : ${{ matrix.runsOn }}
55+ env :
56+ DEVELOPER_DIR : " /Applications/${{ matrix.xcode }}.app/Contents/Developer"
57+ timeout-minutes : 20
58+ strategy :
59+ fail-fast : false
60+ matrix :
61+ include :
62+ - destination : " OS=18.1,name=iPhone 16 Pro"
63+ name : " iOS 18.1"
64+ xcode : " Xcode_16.1"
65+ runsOn : macOS-14
66+ steps :
67+ - uses : actions/checkout@v4
68+ - name : ${{ matrix.name }}
69+ run : xcodebuild test -scheme "pulse" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
70+
71+ tvOS :
72+ name : ${{ matrix.name }}
73+ runs-on : ${{ matrix.runsOn }}
74+ env :
75+ DEVELOPER_DIR : " /Applications/${{ matrix.xcode }}.app/Contents/Developer"
76+ timeout-minutes : 20
77+ strategy :
78+ fail-fast : false
79+ matrix :
80+ include :
81+ - destination : " OS=18.1,name=Apple TV"
82+ name : " tvOS 18.1"
83+ xcode : " Xcode_16.1"
84+ runsOn : macOS-14
85+ steps :
86+ - uses : actions/checkout@v3
87+ - name : ${{ matrix.name }}
88+ run : xcodebuild test -scheme "pulse" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
89+ - name : Upload test coverage reports to Codecov
90+ uses : space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
91+ with :
92+ scheme_name : Pulse
93+ filename : ${{ matrix.name }}
94+ token : ${{ secrets.CODECOV_TOKEN }}
95+
96+ watchOS :
97+ name : ${{ matrix.name }}
98+ runs-on : ${{ matrix.runsOn }}
99+ env :
100+ DEVELOPER_DIR : " /Applications/${{ matrix.xcode }}.app/Contents/Developer"
101+ timeout-minutes : 20
102+ strategy :
103+ fail-fast : false
104+ matrix :
105+ include :
106+ - destination : " OS=11.1,name=Apple Watch Series 10 (46mm)"
107+ name : " watchOS 11.1"
108+ xcode : " Xcode_16.1"
109+ runsOn : macOS-14
110+ steps :
111+ - uses : actions/checkout@v3
112+ - name : ${{ matrix.name }}
113+ run : xcodebuild test -scheme "pulse" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
114+ - name : Upload test coverage reports to Codecov
115+ uses : space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
116+ with :
117+ scheme_name : Pulse
118+ filename : ${{ matrix.name }}
119+ token : ${{ secrets.CODECOV_TOKEN }}
120+
121+ spm :
122+ name : ${{ matrix.name }}
123+ runs-on : ${{ matrix.runsOn }}
124+ env :
125+ DEVELOPER_DIR : " /Applications/${{ matrix.xcode }}.app/Contents/Developer"
126+ timeout-minutes : 20
127+ strategy :
128+ fail-fast : false
129+ matrix :
130+ include :
131+ - name : " macOS 14, SPM 6.0.2 Test"
132+ xcode : " Xcode_16.1"
133+ runsOn : macOS-14
134+ steps :
135+ - uses : actions/checkout@v3
136+ - name : ${{ matrix.name }}
137+ run : swift build -c release
138+
139+ merge-test-reports :
140+ needs : [iOS, macOS, watchOS, tvOS]
141+ runs-on : macos-13
142+ steps :
143+ - name : Download artifacts
144+ uses : actions/download-artifact@v4
145+ with :
146+ path : test_output
147+ - run : xcrun xcresulttool merge test_output/**/*.xcresult --output-path test_output/final/final.xcresult
148+ - name : Upload Merged Artifact
149+ uses : actions/upload-artifact@v4
150+ with :
151+ name : MergedResult
152+ path : test_output/final
153+
154+ discover-typos :
155+ name : Discover Typos
156+ runs-on : macOS-13
157+ env :
158+ DEVELOPER_DIR : /Applications/Xcode_14.1.app/Contents/Developer
159+ steps :
160+ - uses : actions/checkout@v4
161+ - name : Discover typos
162+ run : |
163+ export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"
164+ python3 -m pip install --upgrade pip
165+ python3 -m pip install codespell
166+ codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*"
0 commit comments