Skip to content

Commit

Permalink
Fix Cartfile; Fix Travis; Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Sep 13, 2016
1 parent e188ed4 commit 086852f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
25 changes: 20 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,28 @@ language: objective-c
osx_image: xcode8

env:
- PLATFORM=Mac ACTION=test DESTINATION='platform=OS X'
- PLATFORM=iOS ACTION=test DESTINATION='platform=iOS Simulator,name=iPhone 6S'
- PLATFORM=watchOS ACTION=build DESTINATION='platform=watchOS Simulator,name=Apple Watch - 38mm'
- PLATFORM=tvOS ACTION=test DESTINATION='platform=tvOS Simulator,name=Apple TV 1080p'
- PLATFORM=Mac
- PLATFORM=iOS NAME='iPhone SE'
- PLATFORM=tvOS NAME='Apple TV 1080p'
- PLATFORM=watchOS

before_install:
- if [ -n "$NAME" ]; then
export UUID=$(instruments -s | ruby -e "ARGF.each_line{ |ln| ln =~ /$NAME .* \[(.*)\]/; if \$1; puts(\$1); exit; end }");
fi

install:
- carthage bootstrap --platform $PLATFORM

script:
- set -o pipefail && xcodebuild -scheme PMKAlamofire -destination "$DESTINATION" $ACTION | xcpretty
- set -o pipefail;
case $PLATFORM in
Mac)
xcodebuild -scheme PMKAlamofire test | xcpretty;;
iOS|tvOS)
xcrun instruments -w "$UUID" || true;
sleep 15;
xcodebuild -scheme PMKAlamofire -destination "id=$UUID" test | xcpretty;;
watchOS)
xcodebuild -scheme PMKAlamofire -destination "name=Apple Watch - 38mm" | xcpretty;;
esac
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "mxcl/PromiseKit" ~> 4.0
github "Alamofire/Alamofire" "swift3"
github "Alamofire/Alamofire" ~> 4.0
2 changes: 1 addition & 1 deletion Tests/TestAlamofire.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AlamofireTests: XCTestCase {

let ex = expectation(description: "")

let rq = Alamofire.request("http://example.com", withMethod: .get).responseJSON().then { rsp -> Void in
let rq = Alamofire.request("http://example.com", method: .get).responseJSON().then { rsp -> Void in
XCTAssertEqual(json, rsp as? NSDictionary)
ex.fulfill()
}
Expand Down

0 comments on commit 086852f

Please sign in to comment.