language: objective-c
os: osx
osx_image: xcode7.3

env:
  matrix:
    - TEST_TYPE=iOS
    - TEST_TYPE=OSX
    - TEST_TYPE=tvOS
before_install:
- |
    gem install xcpretty -N --no-ri --no-rdoc

script:
- |
    if [ "$TEST_TYPE" = iOS ]; then
      set -o pipefail
      xcodebuild clean test -workspace Kingfisher.xcworkspace -scheme Kingfisher -destination "platform=iOS Simulator,name=iPhone 6 Plus" -enableCodeCoverage YES | xcpretty
    elif [ "$TEST_TYPE" = OSX ]; then
      set -o pipefail
      xcodebuild clean test -workspace Kingfisher.xcworkspace -scheme Kingfisher-OSX -sdk macosx -enableCodeCoverage YES | xcpretty
    elif [ "$TEST_TYPE" = tvOS ]; then
      set -o pipefail
      xcodebuild clean test -workspace Kingfisher.xcworkspace -scheme Kingfisher-tvOS -destination "platform=tvOS Simulator,name=Apple TV 1080p" -enableCodeCoverage YES | xcpretty
    fi
after_success:
- |
    if [ "$TEST_TYPE" = iOS ] || [ "$TEST_TYPE" = OSX ] || [ "$TEST_TYPE" = tvOS ]; then
      bash <(curl -s https://codecov.io/bash)
    fi

language: objective-c
os: osx
osx_image: xcode8.0

env:
  matrix:
    - TEST_TYPE=iOS
    - TEST_TYPE=OSX
    - TEST_TYPE=tvOS
before_install:
- |
    gem install xcpretty -N --no-ri --no-rdoc

script:
- |
    if [ "$TEST_TYPE" = iOS ]; then
      set -o pipefail
      xcodebuild clean test -workspace Kingfisher.xcworkspace -scheme Kingfisher -destination "platform=iOS Simulator,name=iPhone 6 Plus" -enableCodeCoverage YES | xcpretty
    elif [ "$TEST_TYPE" = OSX ]; then
      set -o pipefail
      xcodebuild clean test -workspace Kingfisher.xcworkspace -scheme Kingfisher-OSX -sdk macosx -enableCodeCoverage YES | xcpretty
    elif [ "$TEST_TYPE" = tvOS ]; then
      set -o pipefail
      xcodebuild clean test -workspace Kingfisher.xcworkspace -scheme Kingfisher-tvOS -destination "platform=tvOS Simulator,name=Apple TV 1080p" -enableCodeCoverage YES | xcpretty
    fi
after_success:
- |
    if [ "$TEST_TYPE" = iOS ] || [ "$TEST_TYPE" = OSX ] || [ "$TEST_TYPE" = tvOS ]; then
      bash <(curl -s https://codecov.io/bash)
    fi

Use new Xcode image for CI
Use new Xcode image for CI
