Skip to content

Commit ed201f5

Browse files
authored
Merge pull request #12 from PromiseKit/ci-pod-lib-lint
[ci] `pod lib lint` for each Xcode/Swift version
2 parents 9c68679 + 311a240 commit ed201f5

File tree

4 files changed

+74
-35
lines changed

4 files changed

+74
-35
lines changed

.travis.yml

Lines changed: 68 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,70 @@
1-
os: osx
2-
language: objective-c
3-
matrix:
1+
branches:
2+
only:
3+
- master
4+
stages:
5+
- lint
6+
- carthage
7+
- test
8+
jobs:
49
include:
5-
- {osx_image: xcode8.3, env: 'PLAT=iOS SWFT=3.1 DST="OS=10.3.1,name=iPhone SE"'}
6-
- {osx_image: xcode8.3, env: 'PLAT=tvOS SWFT=3.1 DST="OS=10.2,name=Apple TV 1080p"'}
10+
- &pod
11+
stage: lint
12+
osx_image: xcode8.3
13+
env: SWIFT=3.1
14+
name: pod lib lint --swift-version=3.1
15+
os: osx
16+
language: objective-c
17+
before_install:
18+
gem install cocoapods --prerelease --version 1.6.0.beta.1
19+
install:
20+
carthage bootstrap --no-build PromiseKit
21+
script: |
22+
cd Carthage/Checkouts/PromiseKit
23+
mv .github/PromiseKit.podspec .
24+
rm -rf Extensions/UIKit/Sources
25+
cp -R ../../../Sources Extensions/UIKit
26+
pod lib lint --subspec=PromiseKit/UIKit --fail-fast --swift-version=$SWIFT
27+
- <<: *pod
28+
osx_image: xcode9.2
29+
env: SWIFT=3.2
30+
name: pod lib lint --swift-version=3.2
31+
- <<: *pod
32+
osx_image: xcode9.4
33+
env: SWIFT=3.3
34+
name: pod lib lint --swift-version=3.3
35+
- <<: *pod
36+
osx_image: xcode10
37+
env: SWIFT=3.4
38+
name: pod lib lint --swift-version=3.4
39+
- <<: *pod
40+
osx_image: xcode9.2
41+
env: SWIFT=4.0
42+
name: pod lib lint --swift-version=4.0
43+
- <<: *pod
44+
osx_image: xcode9.4
45+
env: SWIFT=4.1
46+
name: pod lib lint --swift-version=4.1
47+
- <<: *pod
48+
osx_image: xcode10
49+
env: SWIFT=4.2
50+
name: pod lib lint --swift-version=4.2
751

8-
- {osx_image: xcode9.2, env: 'PLAT=iOS SWFT=3.2 DST="OS=11.2,name=iPhone SE"'}
9-
- {osx_image: xcode9.2, env: 'PLAT=tvOS SWFT=3.2 DST="OS=11.2,name=Apple TV"'}
10-
11-
- {osx_image: xcode9.4, env: 'PLAT=iOS SWFT=3.3 DST="OS=11.4,name=iPhone 5s"'}
12-
- {osx_image: xcode9.4, env: 'PLAT=tvOS SWFT=3.3 DST="OS=11.4,name=Apple TV"'}
13-
14-
- {osx_image: xcode10, env: 'PLAT=iOS SWFT=3.4 DST="OS=12.0,name=iPhone SE"'}
15-
- {osx_image: xcode10, env: 'PLAT=tvOS SWFT=3.4 DST="OS=12.0,name=Apple TV"'}
16-
17-
- {osx_image: xcode9.2, env: 'PLAT=iOS SWFT=4.0 DST="OS=11.2,name=iPhone SE"'}
18-
- {osx_image: xcode9.2, env: 'PLAT=tvOS SWFT=4.0 DST="OS=11.2,name=Apple TV"'}
19-
20-
- {osx_image: xcode9.4, env: 'PLAT=iOS SWFT=4.1 DST="OS=8.4,name=iPhone 4s"'}
21-
- {osx_image: xcode9.4, env: 'PLAT=iOS SWFT=4.1 DST="OS=9.3,name=iPhone 5s"'}
22-
- {osx_image: xcode9.4, env: 'PLAT=iOS SWFT=4.1 DST="OS=10.3.1,name=iPhone SE"'}
23-
- {osx_image: xcode9.4, env: 'PLAT=iOS SWFT=4.1 DST="OS=11.4,name=iPhone 5s"'}
24-
- {osx_image: xcode9.3, env: 'PLAT=tvOS SWFT=4.1 DST="OS=9.2,name=Apple TV 1080p"'}
25-
- {osx_image: xcode9.3, env: 'PLAT=tvOS SWFT=4.1 DST="OS=10.2,name=Apple TV 1080p"'}
26-
- {osx_image: xcode9.4, env: 'PLAT=tvOS SWFT=4.1 DST="OS=11.4,name=Apple TV"'}
27-
28-
- {osx_image: xcode10, env: 'PLAT=iOS SWFT=4.2 DST="OS=12.0,name=iPhone SE"'}
29-
- {osx_image: xcode10, env: 'PLAT=tvOS SWFT=4.2 DST="OS=12.0,name=Apple TV"'}
30-
cache:
31-
directories:
32-
- Carthage
33-
install:
34-
- carthage bootstrap --cache-builds --no-use-binaries --platform $PLAT
35-
script:
36-
- xcodebuild -scheme PMKUIKit -target PMKUIKit -quiet -destination "$DST" build SWIFT_VERSION="$SWFT" SWIFT_TREAT_WARNINGS_AS_ERRORS=YES
52+
- &test
53+
stage: test
54+
osx_image: xcode10
55+
name: iOS Tests
56+
env: DST='OS=12.0,name=iPhone SE' PLAT=iOS
57+
os: osx
58+
language: objective-c
59+
cache:
60+
directories:
61+
- Carthage
62+
before_install:
63+
carthage bootstrap --cache-builds --no-use-binaries --platform $PLAT
64+
install:
65+
xcodebuild -scheme PMKUIKit -target PMKUIKit -quiet -destination "$DST" SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build
66+
script:
67+
xcodebuild -scheme PMKUIKit -quiet -destination "$DST" test
68+
- <<: *test
69+
env: DST='OS=12.0,name=Apple TV' PLAT=tvOS
70+
name: tvOS Tests

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "mxcl/PromiseKit" "6.3.4"
1+
github "mxcl/PromiseKit" "6.5.0"

PMKUIKit.xcodeproj/xcshareddata/xcschemes/PMKUIKit.xcscheme

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@
6868
<Test
6969
Identifier = "UIImagePickerControllerTests/test_fulfills_with_image()">
7070
</Test>
71+
<Test
72+
Identifier = "UIImagePickerControllerTests/test_rejects_when_cancelled()">
73+
</Test>
7174
</SkippedTests>
7275
</TestableReference>
7376
</Testables>

UITests/TestUIImagePickerController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class UIImagePickerControllerTests: XCTestCase {
1919
}
2020

2121
#if !os(tvOS)
22+
// this test works locally but not on travis
23+
// attempting to detect Travis and early-return did not work
2224
func test_rejects_when_cancelled() {
2325
let app = XCUIApplication()
2426
let table = app.tables

0 commit comments

Comments
 (0)