forked from watson-developer-cloud/swift-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
50 lines (48 loc) · 4.86 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
matrix:
include:
- os: linux
dist: trusty
sudo: required
- os: osx
osx_image: xcode8
branches:
only:
- master
env:
global:
- IOS_SDK="iphonesimulator10.0"
- IOS10_DESTINATION="OS=10.0,name=iPhone 6"
before_install:
- openssl aes-256-cbc -K $encrypted_566f29436663_key -iv $encrypted_566f29436663_iv -in Source/SupportingFiles/Credentials.swift.enc -out Source/SupportingFiles/Credentials.swift -d
- for D in `find Tests -type d -maxdepth 1 -mindepth 1`; do echo "cp SupportingFiles/Credentials.swift $D/"; done
after_success:
- bash <(curl -s https://codecov.io/bash)
script:
# build and test for iOS 10
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild build -scheme "RestKit" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "AlchemyDataNewsV1" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "AlchemyLanguageV1" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "AlchemyVisionV1" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "ConversationV1" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "DialogV1" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "DiscoveryV1" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "DocumentConversionV1" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "LanguageTranslatorV2" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "NaturalLanguageClassifierV1" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "NaturalLanguageUnderstandingV1" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "PersonalityInsightsV2" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "PersonalityInsightsV3" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "RelationshipExtractionV1Beta" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "RetrieveAndRankV1" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "SpeechToTextV1" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "TextToSpeechV1" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "ToneAnalyzerV3" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "TradeoffAnalyticsV1" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild test -scheme "VisualRecognitionV3" -sdk "$IOS_SDK" -destination "$IOS10_DESTINATION" -enableCodeCoverage "YES" | xcpretty ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -y ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://swift.org/builds/swift-3.0.2-release/ubuntu1404/swift-3.0.2-RELEASE/swift-3.0.2-RELEASE-ubuntu14.04.tar.gz ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar xzvf swift-3.0.2-RELEASE-ubuntu14.04.tar.gz ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=swift-3.0.2-RELEASE-ubuntu14.04/usr/bin:$PATH ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then rm Source/SupportingFiles/Credentials.swift ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then swift build ; fi
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then swift test ; fi