@@ -16,13 +16,12 @@ jobs:
1616 runs-on : macos-latest
1717 strategy :
1818 matrix :
19- include :
20- - swift : " 6 .0"
21- xcode : " 15.2 "
22- package_file : " Package@swift-6.0.swift "
23- - swift : " 5.9 "
19+ swift : ["5.9", "5.8", "5.7"]
20+ xcode : ["15 .0", "14.3.1"]
21+ exclude :
22+ # Exclude incompatible combinations
23+ - swift : " 5.7 "
2424 xcode : " 15.0"
25- package_file : " Package@swift-5.9.swift"
2625
2726 steps :
2827 - name : Checkout Repository
@@ -38,17 +37,18 @@ jobs:
3837 with :
3938 xcode-version : ${{ matrix.xcode }}
4039
41- - name : Use Correct Package.swift
42- run : |
43- if [ -f "${{ matrix.package_file }}" ]; then
44- cp "${{ matrix.package_file }}" "Package.swift"
45- fi
46-
4740 - name : Show Environment
4841 run : |
4942 swift --version
5043 xcodebuild -version
5144
45+ - name : Install Dependencies
46+ run : |
47+ brew install swiftlint
48+
49+ - name : SwiftLint
50+ run : swiftlint lint --reporter github-actions-logging
51+
5252 - name : Build Package
5353 run : swift build -v
5454
@@ -59,13 +59,24 @@ jobs:
5959 run : |
6060 xcodebuild clean build \
6161 -scheme ${{ env.SCHEME_NAME }} \
62- -destination "platform=iOS Simulator,name=iPhone 15 Pro,OS=18 .2" \
62+ -destination "platform=iOS Simulator,name=iPhone 15 Pro,OS=17 .2" \
6363 -configuration Debug \
6464 CODE_SIGN_IDENTITY="" \
6565 CODE_SIGNING_REQUIRED=NO \
6666 CODE_SIGNING_ALLOWED=NO \
6767 ONLY_ACTIVE_ARCH=YES
6868
69+ - name : Run iOS Tests
70+ run : |
71+ xcodebuild test \
72+ -scheme ${{ env.SCHEME_NAME }} \
73+ -destination "platform=iOS Simulator,name=iPhone 15 Pro,OS=17.2" \
74+ -enableCodeCoverage YES \
75+ -configuration Debug \
76+ CODE_SIGN_IDENTITY="" \
77+ CODE_SIGNING_REQUIRED=NO \
78+ CODE_SIGNING_ALLOWED=NO
79+
6980 - name : Generate Coverage Report
7081 uses : maxep/spm-lcov-action@0.3.1
7182
7485 with :
7586 swift : true
7687 swift_project : ${{ env.SCHEME_NAME }}
88+
89+ documentation :
90+ needs : test
91+ runs-on : macos-latest
92+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
93+
94+ steps :
95+ - uses : actions/checkout@v3
96+
97+ - name : Generate Documentation
98+ uses : SwiftDocOrg/swift-doc@main
99+ with :
100+ inputs : " Sources"
101+ module-name : ${{ env.SCHEME_NAME }}
102+ output : " Documentation"
103+
104+ - name : Upload Documentation
105+ uses : actions/upload-artifact@v3
106+ with :
107+ name : Documentation
108+ path : Documentation
0 commit comments