forked from BottleRocketStudios/iOS-Hyperspace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (48 loc) · 1.79 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
# references:
# * http://www.objc.io/issue-6/travis-ci.html
# * https://github.com/supermarin/xcpretty#usage
osx_image: xcode10.2
language: swift
env:
global:
- WORKSPACE=Hyperspace.xcworkspace
- IOS_FRAMEWORK_SCHEME=Hyperspace_iOS
- TVOS_FRAMEWORK_SCHEME=Hyperspace_tvOS
- WATCHOS_FRAMEWORK_SCHEME=Hyperspace_watchOS
matrix:
- DESTINATION="platform=iOS Simulator,OS=11.2,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" POD_LINT="YES" RUN_DANGER="YES"
- DESTINATION="platform=tvOS Simulator,OS=11.2,name=Apple TV 4K" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" POD_LINT="NO" RUN_DANGER="NO"
- DESTINATION="platform=watchOS Simulator,OS=4.2,name=Apple Watch Series 3 - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" POD_LINT="NO" RUN_DANGER="NO"
cache:
directories:
- Carthage
- ~/.danger-swift
addons:
homebrew:
update: true
taps:
- danger/tap
packages:
- carthage
- danger-swift
before_install:
- carthage bootstrap --verbose --no-use-binaries --platform iOS,tvOS,watchOS --cache-builds
script:
- swiftlint
- set -o pipefail
# Build Framework and Run Tests if specified
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild test -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO -enableCodeCoverage YES | xcpretty;
else
xcodebuild build -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO | xcpretty;
fi
# Run `pod lib lint` if specified
- if [ $POD_LINT == "YES" ]; then
pod lib lint;
fi
# Run Danger if specified
- if [ $RUN_DANGER == "YES" ]; then
DEBUG='*' danger-swift ci;
fi
after_success:
- bash <(curl -s https://codecov.io/bash)