Update the github-ci with visionOS

This commit is contained in:
DreamPiggy 2024-03-09 23:15:00 +08:00
parent 24c18bf403
commit fbfd18664c
3 changed files with 5 additions and 3 deletions

View File

@ -171,6 +171,7 @@ jobs:
iOSSCHEME: SDWebImageSwiftUI iOSSCHEME: SDWebImageSwiftUI
TVSCHEME: SDWebImageSwiftUI tvOS TVSCHEME: SDWebImageSwiftUI tvOS
WATCHSCHEME: SDWebImageSwiftUI watchOS WATCHSCHEME: SDWebImageSwiftUI watchOS
VISIONOSSCHEME: SDWebImageSwiftUI visionOS
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -185,7 +186,7 @@ jobs:
run: brew install carthage run: brew install carthage
- name: Carthage Update - name: Carthage Update
run: ./carthage.sh update --platform "iOS, tvOS, macOS, watchOS" run: ./carthage.sh update --platform "iOS, tvOS, macOS, watchOS, visionOS"
- name: Build as dynamic frameworks - name: Build as dynamic frameworks
run: | run: |
@ -194,3 +195,4 @@ jobs:
xcodebuild build -project "${{ env.PROJECT_NAME }}" -scheme "${{ env.iOSSCHEME }}" -sdk iphoneos -configuration Release | xcpretty -c xcodebuild build -project "${{ env.PROJECT_NAME }}" -scheme "${{ env.iOSSCHEME }}" -sdk iphoneos -configuration Release | xcpretty -c
xcodebuild build -project "${{ env.PROJECT_NAME }}" -scheme "${{ env.TVSCHEME }}" -sdk appletvos -configuration Release | xcpretty -c xcodebuild build -project "${{ env.PROJECT_NAME }}" -scheme "${{ env.TVSCHEME }}" -sdk appletvos -configuration Release | xcpretty -c
xcodebuild build -project "${{ env.PROJECT_NAME }}" -scheme "${{ env.WATCHSCHEME }}" -sdk watchos -configuration Release | xcpretty -c xcodebuild build -project "${{ env.PROJECT_NAME }}" -scheme "${{ env.WATCHSCHEME }}" -sdk watchos -configuration Release | xcpretty -c
xcodebuild build -project "${{ env.PROJECT_NAME }}" -scheme "${{ env.VISIONOSSCHEME }}" -sdk xros -configuration Release | xcpretty -c

View File

@ -17,7 +17,7 @@ class ImageManagerTests: XCTestCase {
func testImageManager() throws { func testImageManager() throws {
let expectation = self.expectation(description: "ImageManager usage with Combine") let expectation = self.expectation(description: "ImageManager usage with Combine")
let imageUrl = URL(string: "https://via.placeholder.com/500x500.jpg") let imageUrl = URL(string: "https://placehold.co/500x500.jpg")
let imageManager = ImageManager() let imageManager = ImageManager()
imageManager.setOnSuccess { image, cacheType, data in imageManager.setOnSuccess { image, cacheType, data in
XCTAssertNotNil(image) XCTAssertNotNil(image)

View File

@ -137,7 +137,7 @@ class WebImageTests: XCTestCase {
func testWebImageOnSuccessWhenCacheMiss() throws { func testWebImageOnSuccessWhenCacheMiss() throws {
let expectation = self.expectation(description: "WebImage onSuccess when cache miss") let expectation = self.expectation(description: "WebImage onSuccess when cache miss")
let imageUrl = URL(string: "http://via.placeholder.com/100x100.png") let imageUrl = URL(string: "https://placehold.co/100x100.png")
let cacheKey = SDWebImageManager.shared.cacheKey(for: imageUrl) let cacheKey = SDWebImageManager.shared.cacheKey(for: imageUrl)
SDImageCache.shared.removeImageFromMemory(forKey: cacheKey) SDImageCache.shared.removeImageFromMemory(forKey: cacheKey)
SDImageCache.shared.removeImageFromDisk(forKey: cacheKey) SDImageCache.shared.removeImageFromDisk(forKey: cacheKey)