Skip to content

Commit d5c32e9

Browse files
committed
Add the Travic-CI script for unit testing
1 parent 65c4893 commit d5c32e9

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.travis.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,24 @@ script:
3131

3232
- echo Build example
3333
- pod install --project-directory=Example
34-
- xcodebuild build -workspace Example/SDWebImageSwiftUI.xcworkspace -scheme SDWebImageSwiftUIDemo -sdk iphonesimulator -destination 'name=iPhone 8' ONLY_ACTIVE_ARCH=NO | xcpretty -c
34+
- xcodebuild build -workspace Example/SDWebImageSwiftUI.xcworkspace -scheme SDWebImageSwiftUIDemo -sdk iphonesimulator -destination 'name=iPhone 11 Pro' -configuration Debug | xcpretty -c
3535

36-
- carthage update --platform iOS
37-
- xcodebuild build -project SDWebImageSwiftUI.xcodeproj -scheme 'SDWebImageSwiftUI' -sdk iphonesimulator -configuration Debug | xcpretty -c
36+
- carthage update
37+
- xcodebuild build -project SDWebImageSwiftUI.xcodeproj -scheme 'SDWebImageSwiftUI' -sdk iphonesimulator -configuration Debug | xcpretty -c
38+
39+
- echo Clean DerivedData
40+
- rm -rf ~/Library/Developer/Xcode/DerivedData/
41+
- mkdir DerivedData
42+
43+
- echo Run the tests
44+
- xcodebuild clean test -project SDWebImageSwiftUI.xcodeproj -scheme 'SDWebImageSwiftUITests' -sdk iphonesimulator -destination 'name=iPhone 11 Pro' -configuration Debug | xcpretty -c
45+
- mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/iOS
46+
- xcodebuild clean test -project SDWebImageSwiftUI.xcodeproj -scheme 'SDWebImageSwiftUITests macOS' -sdk iphonesimulator -destination 'platform=macOS,arch=x86_64' -configuration Debug | xcpretty -c
47+
- mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/macOS
48+
- xcodebuild clean test -project SDWebImageSwiftUI.xcodeproj -scheme 'SDWebImageSwiftUITests tvOS' -sdk iphonesimulator -destination 'platform=tvOS Simulator,name=Apple TV' -configuration Debug | xcpretty -c
49+
- mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/tvOS
50+
51+
after_success:
52+
- bash <(curl -s https://codecov.io/bash) -D './DerivedData/macOS' -J '^SDWebImage$' -F macos
53+
- bash <(curl -s https://codecov.io/bash) -D './DerivedData/iOS' -J '^SDWebImage$' -F ios
54+
- bash <(curl -s https://codecov.io/bash) -D './DerivedData/tvOS' -J '^SDWebImage$'-F tvos

0 commit comments

Comments
 (0)