From fbfd18664c16b0a1b43ce62f2244b4116e99a615 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Sat, 9 Mar 2024 23:15:00 +0800 Subject: [PATCH] Update the github-ci with visionOS --- .github/workflows/CI.yml | 4 +++- Tests/ImageManagerTests.swift | 2 +- Tests/WebImageTests.swift | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 938cccf..47f6dd7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -171,6 +171,7 @@ jobs: iOSSCHEME: SDWebImageSwiftUI TVSCHEME: SDWebImageSwiftUI tvOS WATCHSCHEME: SDWebImageSwiftUI watchOS + VISIONOSSCHEME: SDWebImageSwiftUI visionOS steps: - name: Checkout uses: actions/checkout@v3 @@ -185,7 +186,7 @@ jobs: run: brew install carthage - 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 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.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.VISIONOSSCHEME }}" -sdk xros -configuration Release | xcpretty -c diff --git a/Tests/ImageManagerTests.swift b/Tests/ImageManagerTests.swift index ae3269b..8222f5b 100644 --- a/Tests/ImageManagerTests.swift +++ b/Tests/ImageManagerTests.swift @@ -17,7 +17,7 @@ class ImageManagerTests: XCTestCase { func testImageManager() throws { 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() imageManager.setOnSuccess { image, cacheType, data in XCTAssertNotNil(image) diff --git a/Tests/WebImageTests.swift b/Tests/WebImageTests.swift index bb2ae18..2270dfa 100644 --- a/Tests/WebImageTests.swift +++ b/Tests/WebImageTests.swift @@ -137,7 +137,7 @@ class WebImageTests: XCTestCase { func testWebImageOnSuccessWhenCacheMiss() throws { 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) SDImageCache.shared.removeImageFromMemory(forKey: cacheKey) SDImageCache.shared.removeImageFromDisk(forKey: cacheKey)