From f75d6871987122f2df2c46fdd872b5f6dc52fb98 Mon Sep 17 00:00:00 2001 From: Lukas Schmidt Date: Tue, 24 Jan 2017 21:43:27 +0100 Subject: [PATCH 01/14] try swift 3.1 on linux --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 633b870..d0f3406 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,8 @@ matrix: before_install: - wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import - - cd .. - - export SWIFT_VERSION=swift-3.0.2-RELEASE - - wget https://swift.org/builds/swift-3.0.2-release/ubuntu1404/$SWIFT_VERSION/$SWIFT_VERSION-ubuntu14.04.tar.gz + - export SWIFT_VERSION=swift-3.1-DEVELOPMENT-SNAPSHOT-2017-01-22-a + - wget https://swift.org/builds/swift-3.1-branch/ubuntu1404/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-01-22-a/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-01-22-a-ubuntu14.04.tar.gz - tar xzf $SWIFT_VERSION-ubuntu14.04.tar.gz - export PATH="${PWD}/${SWIFT_VERSION}-ubuntu14.04/usr/bin:${PATH}" - cd DBNetworkStack From f1a5747d8701eb60b3e979df7b5821737534a5ce Mon Sep 17 00:00:00 2001 From: Lukas Schmidt Date: Mon, 3 Apr 2017 07:40:15 +0200 Subject: [PATCH 02/14] Upgrade Xcode version --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index d0f3406..9be6ddd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,13 +17,13 @@ matrix: script: - swift test --verbose - os: osx - osx_image: xcode8.2 + osx_image: xcode8.3 language: objective-c env: "macOS" script: - set -o pipefail && xcodebuild -scheme DBNetworkStack -destination 'platform=OS X' test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -enableCodeCoverage NO | xcpretty - os: osx - osx_image: xcode8.2 + osx_image: xcode8.3 language: objective-c env: "iOS" before_install: @@ -34,7 +34,7 @@ matrix: after_success: - bash <(curl -s https://codecov.io/bash) - os: osx - osx_image: xcode8.2 + osx_image: xcode8.3 language: objective-c env: "watchOS" before_install: @@ -43,7 +43,7 @@ matrix: script: - set -o pipefail && xcodebuild -scheme DBNetworkStack -destination 'platform=watchOS Simulator,name=Apple Watch - 38mm,OS=latest' build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty - os: osx - osx_image: xcode8.2 + osx_image: xcode8.3 language: objective-c env: "tvOS" before_install: @@ -52,7 +52,7 @@ matrix: script: - set -o pipefail && xcodebuild -scheme DBNetworkStack -destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=latest' test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -enableCodeCoverage NO | xcpretty - os: osx - osx_image: xcode8.2 + osx_image: xcode8.3 language: objective-c env: "Swift Package Manager" script: From 665bcb7a1f6c51dc4314d609efe8f1a354c0c8ba Mon Sep 17 00:00:00 2001 From: Lukas Schmidt Date: Mon, 3 Apr 2017 07:43:48 +0200 Subject: [PATCH 03/14] Updates swift linux version to 3.1 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9be6ddd..f5c7b14 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,8 @@ matrix: before_install: - wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import - - cd .. - - export SWIFT_VERSION=swift-3.1-DEVELOPMENT-SNAPSHOT-2017-01-22-a - - wget https://swift.org/builds/swift-3.1-branch/ubuntu1404/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-01-22-a/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-01-22-a-ubuntu14.04.tar.gz + - export SWIFT_VERSION=swift-3.1-RELEASE + - wget https://swift.org/builds/swift-3.1-release/ubuntu1404/$SWIFT_VERSION/$SWIFT_VERSION-ubuntu14.04.tar.gz - tar xzf $SWIFT_VERSION-ubuntu14.04.tar.gz - export PATH="${PWD}/${SWIFT_VERSION}-ubuntu14.04/usr/bin:${PATH}" - cd DBNetworkStack From 757de18d6c5477c6fc81975cb2797100d95c2bca Mon Sep 17 00:00:00 2001 From: Lukas Schmidt Date: Mon, 3 Apr 2017 08:07:41 +0200 Subject: [PATCH 04/14] Fix more swift linux issues --- Source/DBNetworkStackError.swift | 2 +- Source/ModifyRequestNetworkService.swift | 1 + Source/NetworkService.swift | 1 + Source/NetworkTaskMock.swift | 2 +- Source/URLSessionNetworkAccess.swift | 2 +- 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/DBNetworkStackError.swift b/Source/DBNetworkStackError.swift index e38fab3..d296088 100644 --- a/Source/DBNetworkStackError.swift +++ b/Source/DBNetworkStackError.swift @@ -89,7 +89,7 @@ extension DBNetworkStackError : CustomDebugStringConvertible { case .requestError(let error): return "Request error: \(error)" case .serverError(let response, let data): - return "Server error: \(response), response: ".appendingContentsOf(data: data) + return "Server error: \(String(describing: response)), response: ".appendingContentsOf(data: data) case .missingBaseURL: return "Missing base url error" } diff --git a/Source/ModifyRequestNetworkService.swift b/Source/ModifyRequestNetworkService.swift index 83b7c03..0a8249e 100644 --- a/Source/ModifyRequestNetworkService.swift +++ b/Source/ModifyRequestNetworkService.swift @@ -27,6 +27,7 @@ // import Foundation +import Dispatch /// `ModifyRequestNetworkService` can be composed with a networkService to modify all outgoing requests. /// One could add auth tokens or API keys for specifics URLs. diff --git a/Source/NetworkService.swift b/Source/NetworkService.swift index c6146e6..c582dc1 100644 --- a/Source/NetworkService.swift +++ b/Source/NetworkService.swift @@ -26,6 +26,7 @@ // import Foundation +import Dispatch /** `NetworkService` handles network request for resources by using a given `NetworkAccessProviding` diff --git a/Source/NetworkTaskMock.swift b/Source/NetworkTaskMock.swift index 63080d9..86e6361 100644 --- a/Source/NetworkTaskMock.swift +++ b/Source/NetworkTaskMock.swift @@ -49,6 +49,6 @@ public class NetworkTaskMock: NetworkTaskRepresenting { } public var progress: Progress { - return Progress() + return Progress(totalUnitCount: 0) } } diff --git a/Source/URLSessionNetworkAccess.swift b/Source/URLSessionNetworkAccess.swift index 3924d0e..40fcc7e 100644 --- a/Source/URLSessionNetworkAccess.swift +++ b/Source/URLSessionNetworkAccess.swift @@ -34,7 +34,7 @@ extension URLSession: URLSessionProtocol {} extension URLSessionDataTask: NetworkTaskRepresenting { public var progress: Progress { - let totalBytesExpected = response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown + let totalBytesExpected = response?.expectedContentLength ?? -1 let progress = Progress(totalUnitCount: totalBytesExpected) progress.totalUnitCount = totalBytesExpected progress.completedUnitCount = countOfBytesReceived From 2a60ef1bf68c015572cb7b81162a7b3446107223 Mon Sep 17 00:00:00 2001 From: Lukas Schmidt Date: Mon, 3 Apr 2017 08:24:23 +0200 Subject: [PATCH 05/14] Fix more linux swift issues --- Tests/DBNetworkStackTests/DBNetworkStackErrorTest.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tests/DBNetworkStackTests/DBNetworkStackErrorTest.swift b/Tests/DBNetworkStackTests/DBNetworkStackErrorTest.swift index 2c67859..4826794 100644 --- a/Tests/DBNetworkStackTests/DBNetworkStackErrorTest.swift +++ b/Tests/DBNetworkStackTests/DBNetworkStackErrorTest.swift @@ -140,7 +140,7 @@ class DBNetworkStackErrorTest: XCTestCase { func testUnknownError_unauthorized_description() { //Given - let response = HTTPURLResponse() + let response: HTTPURLResponse! = HTTPURLResponse(url: url, statusCode: 0, httpVersion: "1.1", headerFields: nil) let data = "dataString".data(using: .utf8) let error: DBNetworkStackError = .unauthorized(response: response, data: data) @@ -149,12 +149,12 @@ class DBNetworkStackErrorTest: XCTestCase { //Then XCTAssert(debugDescription.hasPrefix("Authorization error: { URL: (null) } { status code: 0, headers {\n} }, response: dataString")) + XCTAssert(debugDescription.hasSuffix("> { URL: https://bahn.de } { status code: 0, headers {\n} }, response: dataString")) } func testUnknownError_clientError_description() { //Given - let response = HTTPURLResponse() + let response: HTTPURLResponse! = HTTPURLResponse(url: url, statusCode: 0, httpVersion: "1.1", headerFields: nil) let data = "dataString".data(using: .utf8) let error: DBNetworkStackError = .clientError(response: response, data: data) @@ -163,7 +163,7 @@ class DBNetworkStackErrorTest: XCTestCase { //Then XCTAssert(debugDescription.hasPrefix("Client error: { URL: (null) } { status code: 0, headers {\n} }, response: dataString")) + XCTAssert(debugDescription.hasSuffix("> { URL: https://bahn.de } { status code: 0, headers {\n} }, response: dataString")) } func testUnknownError_serializationError_description() { From 1b1d614c83965c047521ef79fda8a9266d6bd4dc Mon Sep 17 00:00:00 2001 From: Lukas Schmidt Date: Mon, 3 Apr 2017 08:24:46 +0200 Subject: [PATCH 06/14] Fix swift lint 0.17 issues --- Source/HTTPMethod.swift | 2 ++ .../JSONArrayResourceTest.swift | 4 ++-- .../RetryNetworkserviceTest.swift | 8 +++---- Tests/DBNetworkStackTests/RetryTaskTest.swift | 22 +++++++++---------- .../URLSessionNetworkAccessTest.swift | 2 +- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/Source/HTTPMethod.swift b/Source/HTTPMethod.swift index 2e22cf0..2befe8e 100644 --- a/Source/HTTPMethod.swift +++ b/Source/HTTPMethod.swift @@ -26,6 +26,8 @@ // import Foundation + +// swiftlint:disable identifier_name /** HTTP Methods diff --git a/Tests/DBNetworkStackTests/JSONArrayResourceTest.swift b/Tests/DBNetworkStackTests/JSONArrayResourceTest.swift index 3baa2d1..9cb4db7 100644 --- a/Tests/DBNetworkStackTests/JSONArrayResourceTest.swift +++ b/Tests/DBNetworkStackTests/JSONArrayResourceTest.swift @@ -50,7 +50,7 @@ class JSONArrayResourceTest: XCTestCase { func testResource_WithInvalidData() { //When do { - let _ = try resource.parse(Train.invalidJSONData) + _ = try resource.parse(Train.invalidJSONData) XCTFail() } catch { @@ -60,7 +60,7 @@ class JSONArrayResourceTest: XCTestCase { func testResource_WithInvalidContainer() { //When do { - let _ = try resource.parse(Train.validJSONData) + _ = try resource.parse(Train.validJSONData) XCTFail() } catch { } diff --git a/Tests/DBNetworkStackTests/RetryNetworkserviceTest.swift b/Tests/DBNetworkStackTests/RetryNetworkserviceTest.swift index 5d1e02a..a25bf86 100644 --- a/Tests/DBNetworkStackTests/RetryNetworkserviceTest.swift +++ b/Tests/DBNetworkStackTests/RetryNetworkserviceTest.swift @@ -91,7 +91,7 @@ class RetryNetworkserviceTest: XCTestCase { func testRetryRequest_shouldNotRetry() { //Given let shoudlRetry = false - var error: DBNetworkStackError? + var cpaturedError: DBNetworkStackError? //When weak var task: NetworkTaskRepresenting? @@ -102,13 +102,13 @@ class RetryNetworkserviceTest: XCTestCase { block() }).request(resource, onCompletion: { _ in XCTFail() - }, onError: { err in - error = err + }, onError: { error in + cpaturedError = error }) networkServiceMock.returnError(with: .unknownError, count: 3) //Then XCTAssertNil(task) - XCTAssertNotNil(error) + XCTAssertNotNil(cpaturedError) } } diff --git a/Tests/DBNetworkStackTests/RetryTaskTest.swift b/Tests/DBNetworkStackTests/RetryTaskTest.swift index 7ddd48d..96e39fe 100644 --- a/Tests/DBNetworkStackTests/RetryTaskTest.swift +++ b/Tests/DBNetworkStackTests/RetryTaskTest.swift @@ -51,9 +51,9 @@ class RetryTaskTest: XCTestCase { //Given var successValue: Int? var task: RetryNetworkTask? = RetryNetworkTask(maxmimumNumberOfRetries: 1, idleTimeInterval: 1, - shouldRetry: { err in return true}, onSuccess: { (t: Int) in - successValue = t - }, onError: { err in + shouldRetry: { _ in return true}, onSuccess: { (value: Int) in + successValue = value + }, onError: { _ in }, retryAction: {sucess, _ in sucess(0) return NetworkTaskMock() @@ -112,12 +112,12 @@ class RetryTaskTest: XCTestCase { var task: RetryNetworkTask? = RetryNetworkTask(maxmimumNumberOfRetries: 3, idleTimeInterval: 0.3, shouldRetry: { _ in return true}, onSuccess: { (_: Int) in }, onError: { _ in - }, retryAction: {a, b in + }, retryAction: { onSucess, onError in numerOfRertrys += 1 if numerOfRertrys == 3 { - a(0) + onSucess(0) } else { - b(self.mockError) + onError(self.mockError) } return NetworkTaskMock() @@ -139,12 +139,12 @@ class RetryTaskTest: XCTestCase { } func testShouldNotRetry() { - var error: DBNetworkStackError? + var cpaturedError: DBNetworkStackError? var task: RetryNetworkTask? = RetryNetworkTask(maxmimumNumberOfRetries: 3, idleTimeInterval: 0.3, - shouldRetry: { err in return false}, onSuccess: { _ in + shouldRetry: { _ in return false}, onSuccess: { _ in - }, onError: { err in - error = err + }, onError: { error in + cpaturedError = error }, retryAction: { _, _ in XCTFail() return NetworkTaskMock() @@ -161,6 +161,6 @@ class RetryTaskTest: XCTestCase { onError = nil XCTAssertNil(weakTask) - XCTAssertNotNil(error) + XCTAssertNotNil(cpaturedError) } } diff --git a/Tests/DBNetworkStackTests/URLSessionNetworkAccessTest.swift b/Tests/DBNetworkStackTests/URLSessionNetworkAccessTest.swift index 7dda4db..3767357 100644 --- a/Tests/DBNetworkStackTests/URLSessionNetworkAccessTest.swift +++ b/Tests/DBNetworkStackTests/URLSessionNetworkAccessTest.swift @@ -57,7 +57,7 @@ class URLSessionNetworkAccessTest: XCTestCase { } func testURLSession_MatchesTypeOfNetworkAccess() { - let _: NetworkAccessProviding = URLSession(configuration: .default) + _ = URLSession(configuration: .default) as NetworkAccessProviding } func test_URLSessionCreatsDataTask() { From 3dbe0839c2b2183986a17dc37a91cd8b52704a84 Mon Sep 17 00:00:00 2001 From: Lukas Schmidt Date: Mon, 3 Apr 2017 08:44:08 +0200 Subject: [PATCH 07/14] Fix indeterministic test on linus/darwin --- Tests/DBNetworkStackTests/NetworkRequestTest.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tests/DBNetworkStackTests/NetworkRequestTest.swift b/Tests/DBNetworkStackTests/NetworkRequestTest.swift index 0c6e90e..1bd0d57 100644 --- a/Tests/DBNetworkStackTests/NetworkRequestTest.swift +++ b/Tests/DBNetworkStackTests/NetworkRequestTest.swift @@ -54,7 +54,11 @@ class NetworkRequestTest: XCTestCase { //Then let urlRequest = request.urlRequest(with: baseURL) - XCTAssertEqual(urlRequest.url?.absoluteString, "https://www.bahn.de/index.html?test1=1&test2=2") + let reuqestURL: URL! = urlRequest.url + let query = URLComponents(url: reuqestURL, resolvingAgainstBaseURL: true)?.queryItems + XCTAssertEqual(query?.count, 2) + XCTAssert(query?.contains(where: { $0.name == "test1" && $0.value == "1" }) ?? false) + XCTAssert(query?.contains(where: { $0.name == "test2" && $0.value == "2" }) ?? false) XCTAssertEqual(urlRequest.httpMethod, httpMethod.rawValue) XCTAssertEqual(urlRequest.httpBody, body) XCTAssertEqual(urlRequest.allHTTPHeaderFields ?? [:], headerFields) From 5b316c7fb7470441956c2e6a723c32cc778aeb07 Mon Sep 17 00:00:00 2001 From: Lukas Schmidt Date: Wed, 5 Apr 2017 08:38:59 +0200 Subject: [PATCH 08/14] Improves server error description --- Source/DBNetworkStackError.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/DBNetworkStackError.swift b/Source/DBNetworkStackError.swift index d296088..44a289b 100644 --- a/Source/DBNetworkStackError.swift +++ b/Source/DBNetworkStackError.swift @@ -89,7 +89,11 @@ extension DBNetworkStackError : CustomDebugStringConvertible { case .requestError(let error): return "Request error: \(error)" case .serverError(let response, let data): - return "Server error: \(String(describing: response)), response: ".appendingContentsOf(data: data) + if let response = response { + return "Server error: \(String(describing: response)), response: ".appendingContentsOf(data: data) + } else { + return "Server error: nil, response: ".appendingContentsOf(data: data) + } case .missingBaseURL: return "Missing base url error" } From e6bdbc4738db32f1d13666f3006e07eacdcce1c5 Mon Sep 17 00:00:00 2001 From: Lukas Schmidt Date: Wed, 5 Apr 2017 08:57:03 +0200 Subject: [PATCH 09/14] Use NSURLSessionTransferSizeUnknown on linux and Darwin --- Source/URLSessionNetworkAccess.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/URLSessionNetworkAccess.swift b/Source/URLSessionNetworkAccess.swift index 40fcc7e..b6231ba 100644 --- a/Source/URLSessionNetworkAccess.swift +++ b/Source/URLSessionNetworkAccess.swift @@ -34,7 +34,12 @@ extension URLSession: URLSessionProtocol {} extension URLSessionDataTask: NetworkTaskRepresenting { public var progress: Progress { - let totalBytesExpected = response?.expectedContentLength ?? -1 + #if os(Linux) + let SessionTransferSizeUnknown = URLSessionTransferSizeUnknown + #else + let SessionTransferSizeUnknown = NSURLSessionTransferSizeUnknown + #endif + let totalBytesExpected = response?.expectedContentLength ?? SessionTransferSizeUnknown let progress = Progress(totalUnitCount: totalBytesExpected) progress.totalUnitCount = totalBytesExpected progress.completedUnitCount = countOfBytesReceived From 5e5f1a8645c4bd626562d6c75f80a0de814d3cde Mon Sep 17 00:00:00 2001 From: Lukas Schmidt Date: Wed, 5 Apr 2017 17:34:34 +0200 Subject: [PATCH 10/14] Fix typo --- Tests/DBNetworkStackTests/RetryNetworkserviceTest.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/DBNetworkStackTests/RetryNetworkserviceTest.swift b/Tests/DBNetworkStackTests/RetryNetworkserviceTest.swift index a25bf86..a001afd 100644 --- a/Tests/DBNetworkStackTests/RetryNetworkserviceTest.swift +++ b/Tests/DBNetworkStackTests/RetryNetworkserviceTest.swift @@ -91,7 +91,7 @@ class RetryNetworkserviceTest: XCTestCase { func testRetryRequest_shouldNotRetry() { //Given let shoudlRetry = false - var cpaturedError: DBNetworkStackError? + var capturedError: DBNetworkStackError? //When weak var task: NetworkTaskRepresenting? @@ -103,12 +103,12 @@ class RetryNetworkserviceTest: XCTestCase { }).request(resource, onCompletion: { _ in XCTFail() }, onError: { error in - cpaturedError = error + capturedError = error }) networkServiceMock.returnError(with: .unknownError, count: 3) //Then XCTAssertNil(task) - XCTAssertNotNil(cpaturedError) + XCTAssertNotNil(capturedError) } } From c194608d7f1b9aec3bef6272699bc24eed9927f3 Mon Sep 17 00:00:00 2001 From: Lukas Schmidt Date: Wed, 5 Apr 2017 17:37:06 +0200 Subject: [PATCH 11/14] Fix typo --- Tests/DBNetworkStackTests/RetryTaskTest.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/DBNetworkStackTests/RetryTaskTest.swift b/Tests/DBNetworkStackTests/RetryTaskTest.swift index 96e39fe..598d2e6 100644 --- a/Tests/DBNetworkStackTests/RetryTaskTest.swift +++ b/Tests/DBNetworkStackTests/RetryTaskTest.swift @@ -139,12 +139,12 @@ class RetryTaskTest: XCTestCase { } func testShouldNotRetry() { - var cpaturedError: DBNetworkStackError? + var capturedError: DBNetworkStackError? var task: RetryNetworkTask? = RetryNetworkTask(maxmimumNumberOfRetries: 3, idleTimeInterval: 0.3, shouldRetry: { _ in return false}, onSuccess: { _ in }, onError: { error in - cpaturedError = error + capturedError = error }, retryAction: { _, _ in XCTFail() return NetworkTaskMock() @@ -161,6 +161,6 @@ class RetryTaskTest: XCTestCase { onError = nil XCTAssertNil(weakTask) - XCTAssertNotNil(cpaturedError) + XCTAssertNotNil(capturedError) } } From 1186efcb8cce8bea82fb94cc384f2fa876512e46 Mon Sep 17 00:00:00 2001 From: Lukas Schmidt Date: Wed, 5 Apr 2017 18:02:33 +0200 Subject: [PATCH 12/14] Removes resetting of simulator need to run on travis see https://blog.travis-ci.com/2017-04-05-xcode-82-83-duplicate-simulator-fixes --- .travis.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index f5c7b14..644575e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,9 +26,6 @@ matrix: osx_image: xcode8.3 language: objective-c env: "iOS" - before_install: - - export SNAPSHOT_FORCE_DELETE=1 - - fastlane snapshot reset_simulators script: - set -o pipefail && xcodebuild -scheme DBNetworkStack -destination 'platform=iOS Simulator,name=iPhone SE,OS=latest' test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -enableCodeCoverage YES | xcpretty after_success: @@ -37,18 +34,12 @@ matrix: osx_image: xcode8.3 language: objective-c env: "watchOS" - before_install: - - export SNAPSHOT_FORCE_DELETE=1 - - fastlane snapshot reset_simulators script: - set -o pipefail && xcodebuild -scheme DBNetworkStack -destination 'platform=watchOS Simulator,name=Apple Watch - 38mm,OS=latest' build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty - os: osx osx_image: xcode8.3 language: objective-c env: "tvOS" - before_install: - - export SNAPSHOT_FORCE_DELETE=1 - - fastlane snapshot reset_simulators script: - set -o pipefail && xcodebuild -scheme DBNetworkStack -destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=latest' test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -enableCodeCoverage NO | xcpretty - os: osx @@ -56,4 +47,4 @@ matrix: language: objective-c env: "Swift Package Manager" script: - - swift build --clean && swift test \ No newline at end of file + - swift build --clean && swift test From 2f908811dbe789dd5a1cbe09251a20155e721394 Mon Sep 17 00:00:00 2001 From: Lukas Schmidt Date: Thu, 6 Apr 2017 08:27:52 +0200 Subject: [PATCH 13/14] new Watch simulator for testing --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 644575e..97babba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ matrix: language: objective-c env: "watchOS" script: - - set -o pipefail && xcodebuild -scheme DBNetworkStack -destination 'platform=watchOS Simulator,name=Apple Watch - 38mm,OS=latest' build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty + - set -o pipefail && xcodebuild -scheme DBNetworkStack -destination 'platform=watchOS Simulator,name=Apple Watch Series 2 - 38mm,OS=latest' build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty - os: osx osx_image: xcode8.3 language: objective-c From 7bbd2e5d9618ddc034e12239dd70085774040c82 Mon Sep 17 00:00:00 2001 From: Lukas Schmidt Date: Thu, 6 Apr 2017 08:33:17 +0200 Subject: [PATCH 14/14] Reset watch os simulators --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 97babba..d145f58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,8 +34,11 @@ matrix: osx_image: xcode8.3 language: objective-c env: "watchOS" + before_install: + - export SNAPSHOT_FORCE_DELETE=1 + - fastlane snapshot reset_simulators script: - - set -o pipefail && xcodebuild -scheme DBNetworkStack -destination 'platform=watchOS Simulator,name=Apple Watch Series 2 - 38mm,OS=latest' build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty + - set -o pipefail && xcodebuild -scheme DBNetworkStack -destination 'platform=watchOS Simulator,name=Apple Watch - 38mm,OS=latest' build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty - os: osx osx_image: xcode8.3 language: objective-c