Skip to content

Commit

Permalink
Merge pull request #288 from Quick/podspec-linting-on-ci
Browse files Browse the repository at this point in the history
Adds podspec linting to CI
  • Loading branch information
phatblat committed Apr 25, 2016
2 parents c6f8841 + ddbb7e6 commit 129211b
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 0 deletions.
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
system
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ osx_image: xcode7.3
language: generic
matrix:
include:
- os: osx
sudo: required
env: TYPE=podspec
- os: osx
env: NIMBLE_RUNTIME_IOS_SDK_VERSION=9.0 TYPE=ios
- os: osx
Expand All @@ -14,5 +17,6 @@ matrix:
env: TYPE=swiftpm
install:
- if [[ "$TYPE" == "swiftpm" ]]; then eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/02090c7ede5a637b76e6df1710e83cd0bbe7dcdf/swiftenv-install.sh)"; fi
- if [[ "$TYPE" == "podspec" ]]; then sudo gem install bundler; bundle install; fi
script:
- ./test $TYPE
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# A sample Gemfile
source "https://rubygems.org"

gem 'cocoapods'
63 changes: 63 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.6)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
claide (0.9.1)
cocoapods (0.39.0)
activesupport (>= 4.0.2)
claide (~> 0.9.1)
cocoapods-core (= 0.39.0)
cocoapods-downloader (~> 0.9.3)
cocoapods-plugins (~> 0.4.2)
cocoapods-search (~> 0.1.0)
cocoapods-stats (~> 0.6.2)
cocoapods-trunk (~> 0.6.4)
cocoapods-try (~> 0.5.1)
colored (~> 1.2)
escape (~> 0.0.4)
molinillo (~> 0.4.0)
nap (~> 1.0)
xcodeproj (~> 0.28.2)
cocoapods-core (0.39.0)
activesupport (>= 4.0.2)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-downloader (0.9.3)
cocoapods-plugins (0.4.2)
nap
cocoapods-search (0.1.0)
cocoapods-stats (0.6.2)
cocoapods-trunk (0.6.4)
nap (>= 0.8, < 2.0)
netrc (= 0.7.8)
cocoapods-try (0.5.1)
colored (1.2)
escape (0.0.4)
fuzzy_match (2.0.4)
i18n (0.7.0)
json (1.8.3)
minitest (5.8.4)
molinillo (0.4.4)
nap (1.1.0)
netrc (0.7.8)
thread_safe (0.3.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)
xcodeproj (0.28.2)
activesupport (>= 3)
claide (~> 0.9.1)
colored (~> 1.2)

PLATFORMS
ruby

DEPENDENCIES
cocoapods

BUNDLED WITH
1.11.2
9 changes: 9 additions & 0 deletions test
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ function test_osx {
run xcodebuild -project Nimble.xcodeproj -scheme "Nimble-OSX" -configuration "Debug" -sdk "macosx$BUILD_OSX_SDK_VERSION" build test
}

function test_podspec {
echo "Gathering CocoaPods installation information..."
run bundle exec pod --version
echo "Linting podspec..."
run bundle exec pod lib lint Nimble.podspec
}

function test_swiftpm {
run swift build --clean && swift build && swift test
}
Expand All @@ -83,6 +90,7 @@ function help {
echo " clean - Cleans the derived data directory of Xcode. Assumes default location"
echo " ios - Runs the tests as an iOS device"
echo " osx - Runs the tests on Mac OS X 10.10 (Yosemite and newer only)"
echo " podspec - Runs pod lib lint against the podspec to detect breaking changes"
echo " all - Runs both ios and osx tests"
echo " swiftpm - Runs the tests built by the Swift Package Manager"
echo " help - Displays this help"
Expand All @@ -98,6 +106,7 @@ function main {
clean) clean ;;
ios) test_ios ;;
osx) test_osx ;;
podspec) test_podspec ;;
test) test ;;
all) test ;;
swiftpm) test_swiftpm ;;
Expand Down

0 comments on commit 129211b

Please sign in to comment.