# references:
# * http://www.objc.io/issue-6/travis-ci.html
# * https://github.com/supermarin/xcpretty#usage

osx_image: xcode8
language: objective-c
# cache: cocoapods
podfile: Example/Podfile

before_install:
  - bundle install
  - bundle exec pod install --project-directory=Example

script:
  # This one fails due to http://stackoverflow.com/questions/37922146/xctests-failing-on-physical-device-canceling-tests-due-to-timeout/39896706#39896706
  #- set -o pipefail && xcodebuild -workspace Example/BSGMetrics.xcworkspace -scheme BSGMetrics-Example -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=8.4' test | xcpretty
  - set -o pipefail && xcodebuild -workspace Example/BSGMetrics.xcworkspace -scheme BSGMetrics-Example -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6s,OS=9.3' test | xcpretty
  - set -o pipefail && xcodebuild -workspace Example/BSGMetrics.xcworkspace -scheme BSGMetrics-Example -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 7,OS=10.0' test | xcpretty
  - pod lib lint --allow-warnings

# references:
# * http://www.objc.io/issue-6/travis-ci.html
# * https://github.com/supermarin/xcpretty#usage

osx_image: xcode8
language: objective-c
# cache: cocoapods
podfile: Example/Podfile

before_install:
  - bundle install
  - bundle exec pod repo update
  - bundle exec pod install --project-directory=Example

script:
  # This one fails due to http://stackoverflow.com/questions/37922146/xctests-failing-on-physical-device-canceling-tests-due-to-timeout/39896706#39896706
  #- set -o pipefail && xcodebuild -workspace Example/BSGMetrics.xcworkspace -scheme BSGMetrics-Example -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=8.4' test | xcpretty
  - set -o pipefail && xcodebuild -workspace Example/BSGMetrics.xcworkspace -scheme BSGMetrics-Example -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6s,OS=9.3' test | xcpretty
  - set -o pipefail && xcodebuild -workspace Example/BSGMetrics.xcworkspace -scheme BSGMetrics-Example -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 7,OS=10.0' test | xcpretty
  - pod lib lint --allow-warnings

Add pod repo update in Travis build
Add pod repo update in Travis build
