.travis.yml 1.1 KB

123456789101112131415161718192021222324252627282930
  1. language: objective-c
  2. os: osx
  3. osx_image: xcode7.2
  4. env:
  5. matrix:
  6. - TEST_TYPE=iOS
  7. - TEST_TYPE=OSX
  8. - TEST_TYPE=tvOS
  9. before_install:
  10. - |
  11. gem install xcpretty -N --no-ri --no-rdoc
  12. script:
  13. - |
  14. if [ "$TEST_TYPE" = iOS ]; then
  15. set -o pipefail
  16. xcodebuild clean test -workspace Kingfisher.xcworkspace -scheme Kingfisher -destination "platform=iOS Simulator,name=iPhone 4s" -destination "platform=iOS Simulator,name=iPhone 6 Plus" -enableCodeCoverage YES | xcpretty
  17. elif [ "$TEST_TYPE" = OSX ]; then
  18. set -o pipefail
  19. xcodebuild clean test -workspace Kingfisher.xcworkspace -scheme Kingfisher-OSX -sdk macosx -enableCodeCoverage YES | xcpretty
  20. elif [ "$TEST_TYPE" = tvOS ]; then
  21. set -o pipefail
  22. xcodebuild clean test -workspace Kingfisher.xcworkspace -scheme Kingfisher-tvOS -destination "platform=tvOS Simulator,name=Apple TV 1080p" -enableCodeCoverage YES | xcpretty
  23. fi
  24. after_success:
  25. - |
  26. if [ "$TEST_TYPE" = iOS ] || [ "$TEST_TYPE" = OSX ] || [ "$TEST_TYPE" = tvOS ]; then
  27. bash <(curl -s https://codecov.io/bash)
  28. fi