forked from lucianomarisi/JSONUtilities
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
36 lines (32 loc) · 960 Bytes
/
.travis.yml
File metadata and controls
36 lines (32 loc) · 960 Bytes
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
os:
- osx
language: generic
osx_image: xcode9
env:
global:
- PROJECT_NAME=JSONUtilities
matrix:
- 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 $PROJECT_NAME -enableCodeCoverage YES test | xcpretty;;
iOS|tvOS)
open -a "simulator" --args -CurrentDeviceUDID "$UUID" && xcodebuild -scheme $PROJECT_NAME -destination "id=$UUID" -enableCodeCoverage YES test | xcpretty;;
watchOS)
xcodebuild -scheme $PROJECT_NAME -destination "name=Apple Watch - 38mm" | xcpretty;;
SPM)
swift build && swift test;;
esac
after_success:
- sleep 5
- bash <(curl -s https://codecov.io/bash)