forked from eugeneheckert/iOS-UtiliKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (47 loc) · 1.71 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
# references:
# * http://www.objc.io/issue-6/travis-ci.html
# * https://github.com/supermarin/xcpretty#usage
osx_image: xcode11.3
language: swift
env:
global:
- WORKSPACE=UtiliKit.xcworkspace
- IOS_FRAMEWORK_SCHEME=UtiliKit-iOS
matrix:
- DESTINATION="platform=iOS Simulator,OS=12.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
- .build
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)