Skip to content

Commit

Permalink
Merge pull request #270 from ishkawa/refactor-travis-yml
Browse files Browse the repository at this point in the history
[CI] Refactor .travis.yml
  • Loading branch information
ikesyo authored Apr 6, 2019
2 parents 86d51ec + fb60af3 commit f14b5eb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 32 deletions.
52 changes: 20 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,42 @@ env:

matrix:
include:
- os: osx
- &podspec
os: osx
language: objective-c
osx_image: xcode9.2
osx_image: xcode10.2
script:
- set -o pipefail
- xcodebuild build-for-testing test-without-building -workspace APIKit.xcworkspace -scheme APIKit -configuration Release ENABLE_TESTABILITY=YES | xcpretty -c
- xcodebuild build-for-testing test-without-building -workspace APIKit.xcworkspace -scheme APIKit -configuration Release -sdk iphonesimulator -destination "name=iPhone 6s" ENABLE_TESTABILITY=YES | xcpretty -c
- xcodebuild build-for-testing test-without-building -workspace APIKit.xcworkspace -scheme APIKit -configuration Release -sdk appletvsimulator -destination "name=Apple TV" ENABLE_TESTABILITY=YES | xcpretty -c
after_success:
- bash <(curl -s https://codecov.io/bash)
- os: osx
language: objective-c
osx_image: xcode9.4
script:
- set -o pipefail
- xcodebuild build-for-testing test-without-building -workspace APIKit.xcworkspace -scheme APIKit -configuration Release ENABLE_TESTABILITY=YES | xcpretty -c
- xcodebuild build-for-testing test-without-building -workspace APIKit.xcworkspace -scheme APIKit -configuration Release -sdk iphonesimulator -destination "name=iPhone 6s" ENABLE_TESTABILITY=YES | xcpretty -c
- xcodebuild build-for-testing test-without-building -workspace APIKit.xcworkspace -scheme APIKit -configuration Release -sdk appletvsimulator -destination "name=Apple TV" ENABLE_TESTABILITY=YES | xcpretty -c
after_success:
- bash <(curl -s https://codecov.io/bash)
- os: osx
- pod lib lint --allow-warnings
- &xcode
os: osx
language: objective-c
osx_image: xcode10
osx_image: xcode9.2
script:
- set -o pipefail
- xcodebuild build-for-testing test-without-building -workspace APIKit.xcworkspace -scheme APIKit -configuration Release ENABLE_TESTABILITY=YES | xcpretty -c
- xcodebuild build-for-testing test-without-building -workspace APIKit.xcworkspace -scheme APIKit -configuration Release -sdk iphonesimulator -destination "name=iPhone 6s" ENABLE_TESTABILITY=YES | xcpretty -c
- xcodebuild build-for-testing test-without-building -workspace APIKit.xcworkspace -scheme APIKit -configuration Release -sdk appletvsimulator -destination "name=Apple TV" ENABLE_TESTABILITY=YES | xcpretty -c
after_success:
- bash <(curl -s https://codecov.io/bash)
- os: osx
- <<: *xcode
osx_image: xcode9.4
- <<: *xcode
osx_image: xcode10.1
- <<: *xcode
osx_image: xcode10.2
- &swiftpm
os: osx
language: generic
osx_image: xcode9.2
script:
- swift build
- swift test
- os: osx
language: generic
- <<: *swiftpm
osx_image: xcode9.4
script:
- swift build
- swift test
- os: osx
language: generic
osx_image: xcode10
script:
- swift build
- swift test
- <<: *swiftpm
osx_image: xcode10.1
- <<: *swiftpm
osx_image: xcode10.2

notifications:
email: false
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import APIKit

class ProtobufBodyParametersTests: XCTestCase {
func testProtobufSuccess() {
// Temporarily gated due to https://openradar.appspot.com/49262697
if #available(macOS 10.11, *) {
let object = NSKeyedArchiver.archivedData(withRootObject: ["foo": 1, "bar": 2, "baz": 3])
let parameters = ProtobufBodyParameters(protobufObject: object)
XCTAssertEqual(parameters.contentType, "application/protobuf")
Expand All @@ -21,5 +23,6 @@ class ProtobufBodyParametersTests: XCTestCase {
} catch {
XCTFail()
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class ProtobufDataParserTests: XCTestCase {
}

func testProtobufSuccess() {
// Temporarily gated due to https://openradar.appspot.com/49262697
if #available(macOS 10.11, *) {
let data = NSKeyedArchiver.archivedData(withRootObject: ["foo": 1, "bar": 2, "baz": 3])
let parser = ProtobufDataParser()

Expand All @@ -21,5 +23,6 @@ class ProtobufDataParserTests: XCTestCase {
} catch {
XCTFail()
}
}
}
}

0 comments on commit f14b5eb

Please sign in to comment.