forked from kanyun-inc/YTKNetwork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
32 lines (32 loc) · 1.36 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
language: objective-c
osx_image: xcode8
cache:
- cocoapods
- bundler
env:
matrix:
- TEST_TYPE=iOS
- TEST_TYPE=macOS
- TEST_TYPE=tvOS
before_install:
- |
brew update
brew install carthage
carthage bootstrap
if [ "$TEST_TYPE" = iOS ] || [ "$TEST_TYPE" = macOS ] || [ "$TEST_TYPE" = tvOS ]; then
gem install xcpretty --no-ri --no-rdoc --no-document --quiet
elif [ "$TEST_TYPE" = CocoaPods ]; then
gem install cocoapods --no-ri --no-rdoc --no-document --quiet
fi
script:
- |
if [ "$TEST_TYPE" = iOS ]; then
set -o pipefail
xcodebuild test -scheme "YTKNetwork iOS" -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 6" -skip-testing:"YTKNetwork iOSTests"/YTKPerformanceTests -skip-testing:"YTKNetwork iOSTests"/YTKResumableDownloadTests | xcpretty -c
elif [ "$TEST_TYPE" = macOS ]; then
set -o pipefail
xcodebuild test -scheme "YTKNetwork macOS" -sdk macosx -skip-testing:"YTKNetwork macOSTests"/YTKPerformanceTests -skip-testing:"YTKNetwork macOSTests"/YTKResumableDownloadTests | xcpretty -c
elif [ "$TEST_TYPE" = tvOS ]; then
set -o pipefail
xcodebuild test -scheme "YTKNetwork tvOS" -sdk appletvsimulator -destination "platform=tvOS Simulator,name=Apple TV 1080p" -skip-testing:"YTKNetwork tvOSTests"/YTKPerformanceTests -skip-testing:"YTKNetwork tvOSTests"/YTKResumableDownloadTests | xcpretty -c
fi