forked from BoltsFramework/Bolts-ObjC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (55 loc) · 1.75 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
branches:
only:
- master
language: objective-c
os: osx
osx_image: xcode9.2
cache:
- cocoapods
env:
matrix:
- TEST_TYPE=iOS
- TEST_TYPE=macOS
- TEST_TYPE=tvOS
- TEST_TYPE=CocoaPods
- TEST_TYPE=Carthage
before_install:
- |
if [ "$TEST_TYPE" = iOS ] || [ "$TEST_TYPE" = macOS ] || [ "$TEST_TYPE" = tvOS ]; then
gem install xcpretty -N --no-ri --no-rdoc
elif [ "$TEST_TYPE" = CocoaPods ]; then
gem install cocoapods --pre --quiet --no-ri --no-rdoc
elif [ "$TEST_TYPE" = Carthage ]; then
brew update
brew install carthage || brew upgrade carthage
fi
script:
- |
case $TEST_TYPE in
iOS)
set -o pipefail
xcodebuild test -project Bolts.xcodeproj -sdk iphonesimulator -scheme Bolts-iOS -configuration Debug -destination "platform=iOS Simulator,name=iPhone SE" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
;;
macOS)
set -o pipefail
xcodebuild test -project Bolts.xcodeproj -sdk macosx -scheme Bolts-macOS -configuration Debug GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
;;
tvOS)
set -o pipefail
xcodebuild test -project Bolts.xcodeproj -sdk appletvsimulator -scheme Bolts-tvOS -destination "platform=tvOS Simulator,name=Apple TV" -configuration Debug GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
;;
CocoaPods)
pod lib lint --use-libraries Bolts.podspec
pod lib lint Bolts.podspec
;;
Carthage)
carthage build --no-skip-current
;;
*)
;;
esac
after_success:
- |
if [ "$TEST_TYPE" = iOS ] || [ "$TEST_TYPE" = OSX ] || [ "$TEST_TYPE" = tvOS ]; then
bash <(curl -s https://codecov.io/bash)
fi