diff --git a/.travis.yml b/.travis.yml index c9fe4d8..cf0b766 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,17 +28,21 @@ matrix: language: objective-c cache: cocoapods podfile: Example/Podfile + before_install: -- gem install cocoapods # Since Travis is not always on latest version -- gem update xcodeproj # https://github.com/CocoaPods/CocoaPods/issues/7835 -- pod install --repo-update --project-directory=Example -# Grepping destination device udid -- DESTINATION_UDID=$(instruments -s devices | grep "$DESTINATION \[" | sed -E 's/.*\[([0-9A-F-]+)\].*/\1/g') -# Prelaunching simulator to avoid timeout https://github.com/travis-ci/travis-ci/issues/6422 -# (not working with osx_image: xcode10 and newer?) -#- open -a "simulator" --args -CurrentDeviceUDID $DESTINATION_UDID + - gem install cocoapods # Since Travis is not always on latest version + - gem update xcodeproj # https://github.com/CocoaPods/CocoaPods/issues/7835 + - pod install --repo-update --project-directory=Example + # Grepping destination device udid + - DESTINATION_UDID=$(instruments -s devices | grep "$DESTINATION \[" | sed -E 's/.*\[([0-9A-F-]+)\].*/\1/g') + # Prelaunching simulator to avoid timeout https://github.com/travis-ci/travis-ci/issues/6422 + # (not working with osx_image: xcode10 and newer?) + - if [ ${SWIFT_VERSION} = "4.0" ]; then + open -a Simulator --args -CurrentDeviceUDID $DESTINATION_UDID; + fi + script: -- set -o pipefail && xcodebuild test + - set -o pipefail && xcodebuild test `` -enableCodeCoverage YES `` -workspace Example/CollectionViewCenteredFlowLayout.xcworkspace `` -scheme Example @@ -46,5 +50,5 @@ script: `` -destination "id=$DESTINATION_UDID" `` ONLY_ACTIVE_ARCH=NO `` | xcpretty -- echo $SWIFT_VERSION > .swift-version -- pod lib lint + - echo $SWIFT_VERSION > .swift-version + - pod lib lint