forked from lucianomarisi/JSONUtilities
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (29 loc) · 909 Bytes
/
.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
os:
- osx
language: generic
osx_image: xcode8
env:
- PLATFORM=Mac
- PLATFORM=iOS NAME='iPhone 6s'
- PLATFORM=tvOS NAME='Apple TV 1080p'
- PLATFORM=watchOS
- PLATFORM=SPM
before_install:
- if [ -n "$NAME" ]; then
export UUID=$(instruments -s | ruby -e "ARGF.each_line{ |ln| ln =~ /$NAME .* \[(.*)\]/; if \$1; puts(\$1); exit; end }");
fi
script:
- set -o pipefail;
case $PLATFORM in
Mac)
xcodebuild -scheme JSONUtilities -enableCodeCoverage YES test | xcpretty;;
iOS|tvOS)
open -a "simulator" --args -CurrentDeviceUDID "$UUID" && xcodebuild -scheme JSONUtilities -destination "id=$UUID" -enableCodeCoverage YES test | xcpretty;;
watchOS)
xcodebuild -scheme JSONUtilities -destination "name=Apple Watch - 38mm" | xcpretty;;
SPM)
swift build && swift test;;
esac
after_success:
- sleep 5
- bash <(curl -s https://codecov.io/bash)