diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0e4f74f..e40cd7a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -74,27 +74,13 @@ jobs: - name: Test - ${{ matrix.iosDestination }} run: | set -o pipefail - xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "Tests iOS" -destination "${{ matrix.iosDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO + xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "SDWebImageWebPCoderTests" -destination "${{ matrix.iosDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/iOS - - name: Test - ${{ matrix.macOSDestination }} - run: | - set -o pipefail - xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "Tests Mac" -destination "${{ matrix.macOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO - mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/macOS - - - name: Test - ${{ matrix.tvOSDestination }} - run: | - set -o pipefail - xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "Tests TV" -destination "${{ matrix.tvOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO - mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/tvOS - - name: Code Coverage run: | set -o pipefail export PATH="/usr/local/opt/curl/bin:$PATH" curl --version - bash <(curl -s https://codecov.io/bash) -v -D './DerivedData/macOS' -J '^SDWebImageWebPCoder$' -c -X gcov -F macos bash <(curl -s https://codecov.io/bash) -v -D './DerivedData/iOS' -J '^SDWebImageWebPCoder$' -c -X gcov -F ios - bash <(curl -s https://codecov.io/bash) -v -D './DerivedData/tvOS' -J '^SDWebImageWebPCoder$' -c -X gcov -F tvos diff --git a/Podfile b/Podfile index 30eccae..a97e6c6 100644 --- a/Podfile +++ b/Podfile @@ -8,7 +8,6 @@ target 'SDWebImageWebPCoderExample' do platform :ios, '9.0' project example_project_path pod 'SDWebImageWebPCoder', :path => './' - pod 'SDWebImage', :path => '../SDWebImage' end target 'SDWebImageWebPCoderTests' do @@ -16,5 +15,4 @@ target 'SDWebImageWebPCoderTests' do project test_project_path pod 'Expecta' pod 'SDWebImageWebPCoder', :path => './' - pod 'SDWebImage', :path => '../SDWebImage' end diff --git a/Tests/SDWebImageWebPCoderTests.m b/Tests/SDWebImageWebPCoderTests.m index 324f8c7..c2c797f 100644 --- a/Tests/SDWebImageWebPCoderTests.m +++ b/Tests/SDWebImageWebPCoderTests.m @@ -129,6 +129,9 @@ const int64_t kAsyncTestTimeout = 5; XCTestExpectation *expectation = [self expectationWithDescription:@"test SDAnimatedImageView view category"]; SDAnimatedImageView *imageView = [SDAnimatedImageView new]; NSURL *testURL = [NSURL URLWithString:@"http://littlesvr.ca/apng/images/SteamEngine.webp"]; + NSString *key = [SDWebImageManager.sharedManager cacheKeyForURL:testURL]; + [SDImageCache.sharedImageCache removeImageFromMemoryForKey:key]; + [SDImageCache.sharedImageCache removeImageFromDiskForKey:key]; [imageView sd_setImageWithURL:testURL placeholderImage:nil options:SDWebImageProgressiveLoad progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) { dispatch_async(dispatch_get_main_queue(), ^{ UIImage *image = imageView.image; diff --git a/Tests/SDWebImageWebPCoderTests.xcodeproj/project.pbxproj b/Tests/SDWebImageWebPCoderTests.xcodeproj/project.pbxproj index 2b15956..25bd836 100644 --- a/Tests/SDWebImageWebPCoderTests.xcodeproj/project.pbxproj +++ b/Tests/SDWebImageWebPCoderTests.xcodeproj/project.pbxproj @@ -284,8 +284,8 @@ PRODUCT_NAME = SDWebImageWebPCoder; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; - TARGETED_DEVICE_FAMILY = "1,2"; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos"; + TARGETED_DEVICE_FAMILY = "1,2,3,4"; TVOS_DEPLOYMENT_TARGET = 9.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -358,8 +358,8 @@ PRODUCT_NAME = SDWebImageWebPCoder; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; - TARGETED_DEVICE_FAMILY = "1,2"; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos"; + TARGETED_DEVICE_FAMILY = "1,2,3,4"; TVOS_DEPLOYMENT_TARGET = 9.0; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic";