Skip to content

Commit

Permalink
CircleCI test run.
Browse files Browse the repository at this point in the history
  • Loading branch information
andersio committed Oct 17, 2017
1 parent a2c8616 commit 96b07da
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gem 'xcpretty'
18 changes: 18 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
machine:
xcode:
version: "9.0"

dependencies:
cache_directories:
- "Carthage/"
- "~/.cocoapods"

test:
pre:
- carthage bootstrap --no-build
override:
- script/test iphonesimulator "platform=iOS Simulator,name=iPhone 6s"
- script/test macosx "arch=x86_64"
- script/test appletvsimulator "platform=tvOS Simulator,name=Apple TV 1080p"
- pod lib lint
- carthage build --no-skip-current --cache-builds
25 changes: 25 additions & 0 deletions script/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

if [[ "$1" == "macosx" ]]; then
XCODE_ACTION="build"
fi

if [[ "$1" == "iphonesimulator" || "$1" == "appletvsimulator" ]]; then
XCODE_ACTION="build-for-testing test-without-building"
fi

set -o pipefail
xcodebuild $XCODE_ACTION \
-workspace ReactiveFeedback.xcworkspace \
-scheme ReactiveFeedback \
-sdk "$1" \
-destination "$2" \
-configuration Release \
ENABLE_TESTABILITY=YES \
GCC_GENERATE_DEBUGGING_SYMBOLS=NO \
RUN_CLANG_STATIC_ANALYZER=NO | bundle exec xcpretty
result=$?

if [ "$result" -ne 0 ]; then
exit $result
fi

0 comments on commit 96b07da

Please sign in to comment.