Skip to content

Commit 8b625a4

Browse files
authored
[ci] Run pod lib lint (mxcl#933)
Do `pod lib lint` for one variant This will prevent us getting to the release stage and finding we have issues. Also it is a very thorough set of tests.
1 parent 72f3581 commit 8b625a4

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

.github/codecov.yml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ ignore:
22
- "Tests"
33
- "README.md"
44
- "Documentation"
5+
- ".travis.yml"
56

67
codecov:
78
notify:

.travis.yml

+26-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
# - `pod lib lint` weirdness explanation: https://github.com/CocoaPods/CocoaPods/issues/7123
2+
# - In Travis `cd foo` returns non-zero exit, hence `set +e` before changing directory
3+
14
matrix:
25
include:
6+
- {osx_image: xcode10, env: 'POD_LINT=1', os: osx, language: objective-c}
7+
38
- {osx_image: xcode8.3, env: 'SWFT=3.1 PLAT=iOS DST="OS=10.3.1,name=iPhone SE"', os: osx, language: objective-c}
49
- {osx_image: xcode8.3, env: 'SWFT=3.1 PLAT=tvOS DST="OS=10.2,name=Apple TV 1080p"', os: osx, language: objective-c}
510
- {osx_image: xcode8.3, env: 'SWFT=3.1 PLAT=macOS DST="arch=x86_64"', os: osx, language: objective-c}
@@ -47,15 +52,23 @@ matrix:
4752
# Swift 3.3
4853
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.1.2 TEST=1'}
4954
# Swift 3.4
50-
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=3 SWIFT_VERSION=DEVELOPMENT-SNAPSHOT-2018-06-20-a TEST=1'}
55+
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.2 TEST=1'}
5156
# Swift 4.0
5257
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.0.3'}
5358
# Swift 4.1
5459
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.1.2 TEST=1'}
5560
# Swift 4.2
56-
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=4 SWIFT_VERSION=DEVELOPMENT-SNAPSHOT-2018-06-20-a TEST=1'}
61+
- {os: linux, dist: trusty, sudo: required, language: generic, env: 'SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.2 TEST=1'}
5762
cache:
5863
- Tests/JS-A+/build
64+
- Tests/JS-A+/node_modules
65+
deploy:
66+
provider: script
67+
script:
68+
- mv .github/PromiseKit.podspec .
69+
- pod trunk push
70+
on:
71+
tags: true
5972
before_install:
6073
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
6174
eval "$(curl -sL https://swiftenv.fuller.li/install.sh)";
@@ -65,25 +78,27 @@ install:
6578
iOS|tvOS|macOS|watchOS)
6679
set -e;
6780
xcodebuild -scheme PromiseKit -target PromiseKit SWIFT_VERSION=$SWFT -quiet -destination "$DST" SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build;
68-
set +e;
6981
if [ "$TEST" == "1" ]; then
70-
set -e;
7182
npm install -g npm;
7283
set +e;
7384
cd Tests/JS-A+;
74-
set -ex;
85+
set -e;
7586
npm ci;
7687
npm run build;
7788
set +ex;
7889
cd ../..;
7990
set -e;
8091
xcodebuild -scheme PromiseKit -quiet -destination "$DST" build;
81-
set +e;
8292
fi;;
8393
*)
84-
swift build -Xswiftc -swift-version -Xswiftc $SWIFT_BUILD_VERSION;;
94+
if [[ $POD_LINT != "1" ]]; then
95+
swift build -Xswiftc -swift-version -Xswiftc $SWIFT_BUILD_VERSION;
96+
else
97+
gem install cocoapods --pre;
98+
fi;;
8599
esac
86100
script:
101+
set -e;
87102
case $PLAT in
88103
iOS|tvOS|macOS)
89104
if [[ $TEST == "1" ]]; then
@@ -94,9 +109,12 @@ script:
94109
*)
95110
if [[ $TEST == "1" ]]; then
96111
swift test -Xswiftc -swift-version -Xswiftc 4;
112+
elif [[ $POD_LINT == "1" ]]; then
113+
mv .github/PromiseKit.podspec .;
114+
pod lib lint --fail-fast --verbose | ruby -e 'ARGF.each{ print "." }';
97115
fi;;
98116
esac
99117
after_success:
100-
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
118+
if [ "$TRAVIS_OS_NAME" == "osx" && $POD_LINT != "1" ]; then
101119
bash <(curl -s https://codecov.io/bash);
102120
fi

0 commit comments

Comments
 (0)