|
|
@@ -1,30 +1,24 @@
|
|
|
-language: objective-c
|
|
|
-os: osx
|
|
|
-osx_image: xcode10
|
|
|
+language: swift
|
|
|
+osx_image: xcode10.1
|
|
|
+
|
|
|
+cache: bundler
|
|
|
+
|
|
|
+matrix:
|
|
|
+ include:
|
|
|
+ - name: iOS | Swift 4.2
|
|
|
+ env: LANE=test_ci SCHEME=Kingfisher SWIFT_VERSION=4.2
|
|
|
+ - name: macOS | Swift 4.2
|
|
|
+ env: LANE=test_ci SCHEME=Kingfisher-macOS SWIFT_VERSION=4.2
|
|
|
+ - name: tvOS | Swift 4.2
|
|
|
+ env: LANE=test_ci SCHEME=Kingfisher-tvOS SWIFT_VERSION=4.2
|
|
|
+ - name: iOS | Swift 4.0
|
|
|
+ env: LANE=test_ci SCHEME=Kingfisher SWIFT_VERSION=4.0
|
|
|
+ - name: macOS | Swift 4.0
|
|
|
+ env: LANE=test_ci SCHEME=Kingfisher-macOS SWIFT_VERSION=4.0
|
|
|
+ - name: tvOS | Swift 4.0
|
|
|
+ env: LANE=test_ci SCHEME=Kingfisher-tvOS SWIFT_VERSION=4.0
|
|
|
+ - name: lint
|
|
|
+ env: LANE=lint
|
|
|
|
|
|
-env:
|
|
|
- matrix:
|
|
|
- - TEST_TYPE=iOS
|
|
|
- - TEST_TYPE=macOS
|
|
|
- - TEST_TYPE=tvOS
|
|
|
--before_install:
|
|
|
- - |
|
|
|
- gem install xcpretty -N --no-ri --no-rdoc
|
|
|
script:
|
|
|
-- |
|
|
|
- ./setup.sh
|
|
|
- if [ "$TEST_TYPE" = iOS ]; then
|
|
|
- set -o pipefail
|
|
|
- xcodebuild clean test -workspace Kingfisher.xcworkspace -scheme Kingfisher -destination 'platform=iOS Simulator,name=iPhone 7,OS=10.1' -enableCodeCoverage YES | bundle exec xcpretty
|
|
|
- elif [ "$TEST_TYPE" = macOS ]; then
|
|
|
- set -o pipefail
|
|
|
- xcodebuild clean test -workspace Kingfisher.xcworkspace -scheme Kingfisher-macOS -enableCodeCoverage YES | bundle exec 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" -enableCodeCoverage YES | bundle exec xcpretty
|
|
|
- fi
|
|
|
-after_success:
|
|
|
- - sleep 5
|
|
|
- - if [ "$TEST_TYPE" = iOS ] || [ "$TEST_TYPE" = macOS ] || [ "$TEST_TYPE" = tvOS ]; then
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
|
|
- fi
|
|
|
+ - bundle exec fastlane $LANE
|