Skip to content

Commit 1d982f6

Browse files
committed
Fix the CI action and test cases
1 parent ba6fae4 commit 1d982f6

File tree

4 files changed

+8
-21
lines changed

4 files changed

+8
-21
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,27 +74,13 @@ jobs:
7474
- name: Test - ${{ matrix.iosDestination }}
7575
run: |
7676
set -o pipefail
77-
xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "Tests iOS" -destination "${{ matrix.iosDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO
77+
xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "SDWebImageWebPCoderTests" -destination "${{ matrix.iosDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO
7878
mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/iOS
7979
80-
- name: Test - ${{ matrix.macOSDestination }}
81-
run: |
82-
set -o pipefail
83-
xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "Tests Mac" -destination "${{ matrix.macOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO
84-
mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/macOS
85-
86-
- name: Test - ${{ matrix.tvOSDestination }}
87-
run: |
88-
set -o pipefail
89-
xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "Tests TV" -destination "${{ matrix.tvOSDestination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO
90-
mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/tvOS
91-
9280
- name: Code Coverage
9381
run: |
9482
set -o pipefail
9583
export PATH="/usr/local/opt/curl/bin:$PATH"
9684
curl --version
97-
bash <(curl -s https://codecov.io/bash) -v -D './DerivedData/macOS' -J '^SDWebImageWebPCoder$' -c -X gcov -F macos
9885
bash <(curl -s https://codecov.io/bash) -v -D './DerivedData/iOS' -J '^SDWebImageWebPCoder$' -c -X gcov -F ios
99-
bash <(curl -s https://codecov.io/bash) -v -D './DerivedData/tvOS' -J '^SDWebImageWebPCoder$' -c -X gcov -F tvos
10086

Podfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ target 'SDWebImageWebPCoderExample' do
88
platform :ios, '9.0'
99
project example_project_path
1010
pod 'SDWebImageWebPCoder', :path => './'
11-
pod 'SDWebImage', :path => '../SDWebImage'
1211
end
1312

1413
target 'SDWebImageWebPCoderTests' do
1514
platform :ios, '9.0'
1615
project test_project_path
1716
pod 'Expecta'
1817
pod 'SDWebImageWebPCoder', :path => './'
19-
pod 'SDWebImage', :path => '../SDWebImage'
2018
end

Tests/SDWebImageWebPCoderTests.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ - (void)test32AnimatedImageViewCategoryProgressive {
129129
XCTestExpectation *expectation = [self expectationWithDescription:@"test SDAnimatedImageView view category"];
130130
SDAnimatedImageView *imageView = [SDAnimatedImageView new];
131131
NSURL *testURL = [NSURL URLWithString:@"http://littlesvr.ca/apng/images/SteamEngine.webp"];
132+
NSString *key = [SDWebImageManager.sharedManager cacheKeyForURL:testURL];
133+
[SDImageCache.sharedImageCache removeImageFromMemoryForKey:key];
134+
[SDImageCache.sharedImageCache removeImageFromDiskForKey:key];
132135
[imageView sd_setImageWithURL:testURL placeholderImage:nil options:SDWebImageProgressiveLoad progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
133136
dispatch_async(dispatch_get_main_queue(), ^{
134137
UIImage *image = imageView.image;

Tests/SDWebImageWebPCoderTests.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@
284284
PRODUCT_NAME = SDWebImageWebPCoder;
285285
SDKROOT = iphoneos;
286286
SKIP_INSTALL = YES;
287-
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
288-
TARGETED_DEVICE_FAMILY = "1,2";
287+
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos";
288+
TARGETED_DEVICE_FAMILY = "1,2,3,4";
289289
TVOS_DEPLOYMENT_TARGET = 9.0;
290290
VERSIONING_SYSTEM = "apple-generic";
291291
VERSION_INFO_PREFIX = "";
@@ -358,8 +358,8 @@
358358
PRODUCT_NAME = SDWebImageWebPCoder;
359359
SDKROOT = iphoneos;
360360
SKIP_INSTALL = YES;
361-
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
362-
TARGETED_DEVICE_FAMILY = "1,2";
361+
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvsimulator appletvos";
362+
TARGETED_DEVICE_FAMILY = "1,2,3,4";
363363
TVOS_DEPLOYMENT_TARGET = 9.0;
364364
VALIDATE_PRODUCT = YES;
365365
VERSIONING_SYSTEM = "apple-generic";

0 commit comments

Comments
 (0)