File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed
Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change 1515 - name : Checkout
1616 uses : actions/checkout@v4
1717
18- - name : Setup Swift
18+ - name : Setup Xcode
19+ uses : maxim-lobanov/setup-xcode@v1
20+ with :
21+ xcode-version : ' latest'
22+
23+ - name : Verify Swift Version
1924 run : |
2025 swift --version
26+ SWIFT_VERSION=$(swift --version | grep -oE 'Swift version [0-9]+\.[0-9]+' | grep -oE '[0-9]+\.[0-9]+')
27+ echo "Detected Swift version: $SWIFT_VERSION"
28+ MAJOR=$(echo $SWIFT_VERSION | cut -d. -f1)
29+ MINOR=$(echo $SWIFT_VERSION | cut -d. -f2)
30+ if [ "$MAJOR" -lt 6 ] || ([ "$MAJOR" -eq 6 ] && [ "$MINOR" -lt 2 ]); then
31+ echo "Error: Swift 6.2 or later is required, but found $SWIFT_VERSION"
32+ echo "Please update the Xcode version in the workflow or wait for GitHub Actions to provide Swift 6.2"
33+ exit 1
34+ fi
35+ echo "✓ Swift version $SWIFT_VERSION meets requirement (>= 6.2)"
2136
2237 - name : Resolve Dependencies
2338 run : swift package resolve
4156 - name : Checkout
4257 uses : actions/checkout@v4
4358
59+ - name : Setup Xcode
60+ uses : maxim-lobanov/setup-xcode@v1
61+ with :
62+ xcode-version : ' latest'
63+
4464 - name : Run SwiftLint
4565 uses : norio-nomura/action-swiftlint@3.2.1
4666 continue-on-error : true
5474 - name : Checkout
5575 uses : actions/checkout@v4
5676
77+ - name : Setup Xcode
78+ uses : maxim-lobanov/setup-xcode@v1
79+ with :
80+ xcode-version : ' latest'
81+
5782 - name : Run Tests with Coverage
5883 run : swift test --enable-code-coverage
5984 env :
You can’t perform that action at this time.
0 commit comments