language: objective-c
osx_image: xcode9
env:
  global:
  - LC_CTYPE=en_US.UTF-8
  - LANG=en_US.UTF-8
  - PROJECT=MetovaTestKit.xcodeproj
  - IOS_FRAMEWORK_SCHEME="MetovaTestKit"
  - IOS_SDK=iphonesimulator11.0
  matrix:
    - DESTINATION="OS=11.0,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" POD_LINT="YES"
before_install:
  - bundle install --without=documentation
  - bundle exec pod install
script:
  - set -o pipefail
  - xcodebuild -version
  - xcodebuild -showsdks

  # Build Framework in Debug and Run Tests if specified
  - if [ $RUN_TESTS == "YES" ]; then
      xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug test | xcpretty -c;
    else
      xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug build | xcpretty -c;
    fi

  # Run `pod lib lint` if specified
  - if [ $POD_LINT == "YES" ]; then
      bundle exec pod lib lint;
    fi
after_success:
 - bundle binstub slather
 - bin/slather coverage --binary-basename MetovaTestKit

language: objective-c
osx_image: xcode9
env:
  global:
  - LC_CTYPE=en_US.UTF-8
  - LANG=en_US.UTF-8
  - PROJECT=MetovaTestKit.xcodeproj
  - IOS_FRAMEWORK_SCHEME="MetovaTestKit"
  - IOS_SDK=iphonesimulator11.0
  matrix:
    - DESTINATION="OS=11.0,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" POD_LINT="YES"
before_install:
  - bundle install --without=documentation
  - bundle exec pod repo update
  - bundle exec pod install
script:
  - set -o pipefail
  - xcodebuild -version
  - xcodebuild -showsdks

  # Build Framework in Debug and Run Tests if specified
  - if [ $RUN_TESTS == "YES" ]; then
      xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug test | xcpretty -c;
    else
      xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug build | xcpretty -c;
    fi

  # Run `pod lib lint` if specified
  - if [ $POD_LINT == "YES" ]; then
      bundle exec pod lib lint;
    fi
after_success:
 - bundle binstub slather
 - bin/slather coverage --binary-basename MetovaTestKit

Update specs repo before trying to pod install.
Update specs repo before trying to pod install.

