File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
1
language : swift
2
- osx_image : xcode11.3
2
+ osx_image : xcode11.4
3
3
4
4
env :
5
5
global :
@@ -43,13 +43,12 @@ script:
43
43
- echo Run the tests
44
44
- xcodebuild clean test -project SDWebImageSwiftUI.xcodeproj -scheme 'SDWebImageSwiftUITests' -destination 'name=iPhone 11 Pro Max' -configuration Debug | xcpretty -c
45
45
- mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/iOS
46
- # Catalina
47
- # - xcodebuild clean test -project SDWebImageSwiftUI.xcodeproj -scheme 'SDWebImageSwiftUITests macOS' -destination 'platform=macOS,arch=x86_64' -configuration Debug | xcpretty -c
48
- # - mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/macOS
46
+ - xcodebuild clean test -project SDWebImageSwiftUI.xcodeproj -scheme 'SDWebImageSwiftUITests macOS' -destination 'platform=macOS,arch=x86_64' -configuration Debug | xcpretty -c
47
+ - mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/macOS
49
48
- xcodebuild clean test -project SDWebImageSwiftUI.xcodeproj -scheme 'SDWebImageSwiftUITests tvOS' -destination 'platform=tvOS Simulator,name=Apple TV' -configuration Debug | xcpretty -c
50
49
- mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/tvOS
51
50
52
51
after_success :
53
- # - bash <(curl -s https://codecov.io/bash) -D './DerivedData/macOS' -J '^SDWebImageSwiftUI$' -F macos
54
52
- bash <(curl -s https://codecov.io/bash) -D './DerivedData/iOS' -J '^SDWebImageSwiftUI$' -F ios
53
+ - bash <(curl -s https://codecov.io/bash) -D './DerivedData/macOS' -J '^SDWebImageSwiftUI$' -F macos
55
54
- bash <(curl -s https://codecov.io/bash) -D './DerivedData/tvOS' -J '^SDWebImageSwiftUI$'-F tvos
Original file line number Diff line number Diff line change @@ -158,10 +158,15 @@ class WebImageTests: XCTestCase {
158
158
let imageUrl = URL ( string: " https://raw.githubusercontent.com/recurser/exif-orientation-examples/master/Landscape_5.jpg " )
159
159
let imageView = WebImage ( url: imageUrl)
160
160
let introspectView = imageView. onSuccess { image, data, cacheType in
161
+ #if os(macOS)
162
+ let displayImage = try ? imageView. inspect ( ) . group ( ) . image ( 0 ) . nsImage ( )
163
+ XCTAssertNotNil ( displayImage)
164
+ #else
161
165
let displayImage = try ? imageView. inspect ( ) . group ( ) . image ( 0 ) . cgImage ( )
162
166
let orientation = try ! imageView. inspect ( ) . group ( ) . image ( 0 ) . orientation ( )
163
167
XCTAssertNotNil ( displayImage)
164
168
XCTAssertEqual ( orientation, . leftMirrored)
169
+ #endif
165
170
expectation. fulfill ( )
166
171
} . onFailure { error in
167
172
XCTFail ( error. localizedDescription)
You can’t perform that action at this time.
0 commit comments