Skip to content

Commit

Permalink
Make separate script for travis
Browse files Browse the repository at this point in the history
  • Loading branch information
nvzqz committed Jun 27, 2017
1 parent 07cc8a2 commit 189ede8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 8 deletions.
9 changes: 1 addition & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,4 @@ env:
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then gem install xcpretty -N; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then eval "$(curl -sL $SWIFTENV_INSTALL)"; fi
script:
- set -o pipefail
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then swift test; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -version; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project $FRAMEWORK_NAME.xcodeproj -scheme "$FRAMEWORK_NAME macOS" ONLY_ACTIVE_ARCH=YES test | xcpretty -c; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project $FRAMEWORK_NAME.xcodeproj -scheme "$FRAMEWORK_NAME iOS" -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 6,OS=10.1" ONLY_ACTIVE_ARCH=NO test | xcpretty -c; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcodebuild -project $FRAMEWORK_NAME.xcodeproj -scheme "$FRAMEWORK_NAME tvOS" -sdk appletvsimulator -destination "platform=tvOS Simulator,name=Apple TV 1080p" ONLY_ACTIVE_ARCH=NO test | xcpretty -c; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pod lib lint --quick; fi
script: ./ci/travis.sh
33 changes: 33 additions & 0 deletions ci/travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

set -e -o pipefail

if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
swift test
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
xcodebuild -version

xcodebuild \
-project $FRAMEWORK_NAME.xcodeproj \
-scheme "$FRAMEWORK_NAME macOS" \
ONLY_ACTIVE_ARCH=YES \
test | xcpretty

xcodebuild \
-project $FRAMEWORK_NAME.xcodeproj \
-scheme "$FRAMEWORK_NAME iOS" \
-sdk iphonesimulator \
-destination "platform=iOS Simulator,name=iPhone 6,OS=10.1" \
ONLY_ACTIVE_ARCH=NO \
test | xcpretty

xcodebuild \
-project $FRAMEWORK_NAME.xcodeproj \
-scheme "$FRAMEWORK_NAME tvOS" \
-sdk appletvsimulator \
-destination "platform=tvOS Simulator,name=Apple TV 1080p" \
ONLY_ACTIVE_ARCH=NO \
test | xcpretty

pod lib lint --quick
fi

0 comments on commit 189ede8

Please sign in to comment.