forked from Xinguang/AlamofireSwiftyJSON
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
67 lines (62 loc) · 2.29 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
language: objective-c
xcode_project: AlamofireSwiftyJSON.xcodeproj
osx_image: xcode8.3
xcode_sdk: iphonesimulator10.0
xcode_scheme: AlamofireSwiftyJSON
env:
matrix:
- TEST_TYPE=iOS
- TEST_TYPE=OSX
- TEST_TYPE=watchOS
- TEST_TYPE=tvOS
- TEST_TYPE=PODLINT
before_install:
- |
if [ "$TEST_TYPE" = iOS ]; then
if ! which swiftlint >/dev/null; then
brew install swiftlint
fi
gem install xcpretty -N --no-ri --no-rdoc
elif [ "$TEST_TYPE" = PODLINT ]; then
gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet
fi
# - brew update
# - brew install carthage
# - gem install cocoapods
install:
- |
if [ "$TEST_TYPE" = iOS ]; then
carthage bootstrap --platform iOS --no-use-binaries
elif [ "$TEST_TYPE" = OSX ]; then
carthage bootstrap --platform Mac --no-use-binaries
elif [ "$TEST_TYPE" = watchOS ]; then
carthage bootstrap --platform watchOS --no-use-binaries
elif [ "$TEST_TYPE" = tvOS ]; then
carthage bootstrap --platform tvOS --no-use-binaries
elif [ "$TEST_TYPE" = PODLINT ]; then
pod repo update > podrepoupdate.log
# git -C ~/.cocoapods/repos/master/ pull
fi
script:
- |
if [ "$TEST_TYPE" = iOS ]; then
xcodebuild clean test -scheme 'AlamofireSwiftyJSON iOS' -destination "platform=iOS Simulator,name=iPhone 7 Plus" -sdk iphonesimulator -enableCodeCoverage YES | xcpretty
elif [ "$TEST_TYPE" = OSX ]; then
xcodebuild -scheme "AlamofireSwiftyJSON macOS" -sdk macosx ONLY_ACTIVE_ARCH=NO test
elif [ "$TEST_TYPE" = watchOS ]; then
xcodebuild -scheme "AlamofireSwiftyJSON watchOS" -sdk watchsimulator ONLY_ACTIVE_ARCH=NO build
elif [ "$TEST_TYPE" = tvOS ]; then
xcodebuild -scheme "AlamofireSwiftyJSON tvOS" -sdk appletvsimulator ONLY_ACTIVE_ARCH=NO build
elif [ "$TEST_TYPE" = PODLINT ]; then
pod lib lint --allow-warnings --no-clean
fi
# - cd demo
# - carthage update --platform ios
# - xctool -project carthage.xcodeproj -scheme demo -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
# - pod install
# - xctool -workspace pod.xcworkspace -scheme pod -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
after_success:
- |
if [ "$TEST_TYPE" = iOS ]; then
bash <(curl -s https://codecov.io/bash) -X xcodeplist -J 'AlamofireSwiftyJSON iOS'
fi