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

osx_image: xcode9.3
language: swift
env:
  global:
    - WORKSPACE=Shifty.xcworkspace
    - IOS_FRAMEWORK_SCHEME="Shifty-iOSExample"
  matrix:
    - DESTINATION="platform=iOS Simulator,OS=11.3,name=iPhone X" SDK="iphonesimulator" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" POD_LINT="YES"

before_install:
  - brew upgrade swiftlint

script:
  - swiftlint
  - set -o pipefail

  # Build Framework and Run Tests if specified
  - if [ $RUN_TESTS == "YES" ]; then
      xcodebuild test -enableCodeCoverage YES -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -sdk "$SDK" ONLY_ACTIVE_ARCH=NO | xcpretty;
    else
      xcodebuild build -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -sdk "$SDK" ONLY_ACTIVE_ARCH=NO | xcpretty;
    fi

  # Run `pod lib lint` if specified
  - if [ $POD_LINT == "YES" ]; then
      pod lib lint;
    fi

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

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

osx_image: xcode9.3
language: swift
env:
  global:
    - WORKSPACE=Shifty.xcworkspace
    - IOS_FRAMEWORK_SCHEME="Shifty"
  matrix:
    - DESTINATION="platform=iOS Simulator,OS=11.3,name=iPhone X" SDK="iphonesimulator" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" POD_LINT="YES"

before_install:
  - brew upgrade swiftlint

script:
  - swiftlint
  - set -o pipefail

  # Build Framework and Run Tests if specified
  - if [ $RUN_TESTS == "YES" ]; then
      xcodebuild test -enableCodeCoverage YES -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -sdk "$SDK" ONLY_ACTIVE_ARCH=NO | xcpretty;
    else
      xcodebuild build -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -sdk "$SDK" ONLY_ACTIVE_ARCH=NO | xcpretty;
    fi

  # Run `pod lib lint` if specified
  - if [ $POD_LINT == "YES" ]; then
      pod lib lint;
    fi

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

Change scheme to build in CI
Change scheme to build in CI

