99 paths :
1010 - ' .swiftlint.yml'
1111 - " .github/workflows/**"
12+ - " Package@swift-5.7.swift"
13+ - " Package@swift-5.8.swift"
1214 - " Package.swift"
13- - " Source/**"
15+ - " Source/Flare/ **"
1416 - " Tests/**"
1517
1618jobs :
17- SwiftLint :
18- runs-on : ubuntu-latest
19- steps :
20- - uses : actions/checkout@v3
21- - name : GitHub Action for SwiftLint
22- uses : norio-nomura/action-swiftlint@3.2.1
23- with :
24- args : --strict
25- env :
26- DIFF_BASE : ${{ github.base_ref }}
2719 macOS :
2820 name : ${{ matrix.name }}
2921 runs-on : ${{ matrix.runsOn }}
@@ -47,19 +39,20 @@ jobs:
4739 runsOn : macOS-12
4840 name : " macOS 12, Xcode 14.1, Swift 5.7.1"
4941 steps :
50- - uses : actions/checkout@v3
42+ - uses : actions/checkout@v4
5143 - name : ${{ matrix.name }}
52- run : xcodebuild test -scheme "Flare" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
53- - name : Upload coverage reports to Codecov
54- uses : codecov/codecov-action@v3.1.0
55- with :
56- token : ${{ secrets.CODECOV_TOKEN }}
57- xcode : true
58- xcode_archive_path : test_output/${{ matrix.name }}.xcresult
59- - uses : actions/upload-artifact@v4
44+ uses : ./.github/actions/build_and_test
6045 with :
46+ scheme : Flare
47+ destination : " platform=macOS"
6148 name : ${{ matrix.name }}
62- path : test_output
49+ generate_project : false
50+ - name : Upload test coverage reports to Codecov
51+ uses : ./.github/actions/upload_test_coverage_report
52+ with :
53+ scheme_name : Flare
54+ filename : ${{ matrix.name }}
55+ token : ${{ secrets.CODECOV_TOKEN }}
6356
6457 iOS :
6558 name : ${{ matrix.name }}
@@ -80,17 +73,20 @@ jobs:
8073 xcode : " Xcode_14.3.1"
8174 runsOn : macos-13
8275 steps :
83- - uses : actions/checkout@v3
84- - name : Install Dependencies
85- run : make setup_build_tools
86- - name : Generate project
87- run : make generate
76+ - uses : actions/checkout@v4
8877 - name : ${{ matrix.name }}
89- run : xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan AllTests clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
90- - uses : actions/upload-artifact@v4
78+ uses : ./.github/actions/build_and_test
9179 with :
80+ scheme : Flare
81+ destination : ${{ matrix.destination }}
9282 name : ${{ matrix.name }}
93- path : test_output
83+ test_plan : AllTests
84+ - name : Upload test coverage reports to Codecov
85+ uses : ./.github/actions/upload_test_coverage_report
86+ with :
87+ scheme_name : Flare
88+ filename : ${{ matrix.name }}
89+ token : ${{ secrets.CODECOV_TOKEN }}
9490
9591 tvOS :
9692 name : ${{ matrix.name }}
@@ -111,23 +107,20 @@ jobs:
111107 xcode : " Xcode_14.3.1"
112108 runsOn : macos-13
113109 steps :
114- - uses : actions/checkout@v3
115- - name : Install Dependencies
116- run : make setup_build_tools
117- - name : Generate project
118- run : make generate
110+ - uses : actions/checkout@v4
119111 - name : ${{ matrix.name }}
120- run : xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan AllTests clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
121- - name : Upload coverage reports to Codecov
122- uses : codecov/codecov-action@v3.1.0
123- with :
124- token : ${{ secrets.CODECOV_TOKEN }}
125- xcode : true
126- xcode_archive_path : test_output/${{ matrix.name }}.xcresult
127- - uses : actions/upload-artifact@v4
112+ uses : ./.github/actions/build_and_test
128113 with :
114+ scheme : Flare
115+ destination : ${{ matrix.destination }}
129116 name : ${{ matrix.name }}
130- path : test_output
117+ test_plan : AllTests
118+ - name : Upload test coverage reports to Codecov
119+ uses : ./.github/actions/upload_test_coverage_report
120+ with :
121+ scheme_name : Flare
122+ filename : ${{ matrix.name }}
123+ token : ${{ secrets.CODECOV_TOKEN }}
131124
132125 watchOS :
133126 name : ${{ matrix.name }}
@@ -152,23 +145,20 @@ jobs:
152145 xcode : " Xcode_14.3.1"
153146 runsOn : macos-13
154147 steps :
155- - uses : actions/checkout@v3
156- - name : Install Dependencies
157- run : make setup_build_tools
158- - name : Generate project
159- run : make generate
148+ - uses : actions/checkout@v4
160149 - name : ${{ matrix.name }}
161- run : xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan UnitTests clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
162- - name : Upload coverage reports to Codecov
163- uses : codecov/codecov-action@v3.1.0
164- with :
165- token : ${{ secrets.CODECOV_TOKEN }}
166- xcode : true
167- xcode_archive_path : test_output/${{ matrix.name }}.xcresult
168- - uses : actions/upload-artifact@v4
150+ uses : ./.github/actions/build_and_test
169151 with :
152+ scheme : Flare
153+ destination : ${{ matrix.destination }}
170154 name : ${{ matrix.name }}
171- path : test_output
155+ test_plan : UnitTests
156+ - name : Upload test coverage reports to Codecov
157+ uses : ./.github/actions/upload_test_coverage_report
158+ with :
159+ scheme_name : Flare
160+ filename : ${{ matrix.name }}
161+ token : ${{ secrets.CODECOV_TOKEN }}
172162
173163 spm :
174164 name : ${{ matrix.name }}
@@ -187,7 +177,7 @@ jobs:
187177 xcode : " Xcode_14.3.1"
188178 runsOn : macos-13
189179 steps :
190- - uses : actions/checkout@v3
180+ - uses : actions/checkout@v4
191181 - name : ${{ matrix.name }}
192182 run : swift build -c release --target Flare
193183
@@ -212,7 +202,7 @@ jobs:
212202 env :
213203 DEVELOPER_DIR : /Applications/Xcode_14.1.app/Contents/Developer
214204 steps :
215- - uses : actions/checkout@v2
205+ - uses : actions/checkout@v4
216206 - name : Discover typos
217207 run : |
218208 export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"
@@ -234,6 +224,6 @@ jobs:
234224 # name: "visionOS 1.0"
235225 # scheme: "Flare"
236226 # steps:
237- # - uses: actions/checkout@v3
227+ # - uses: actions/checkout@v4
238228 # - name: ${{ matrix.name }}
239229 # run: xcodebuild test -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean || exit 1
0 commit comments