Skip to content

Commit 7ae5027

Browse files
committed
Merge pull request #739 from ParsePlatform/nlutsenko.travis.carthage
Add Carthage to Travis-CI.
2 parents 8e429a4 + 1d11dab commit 7ae5027

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

.travis.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ env:
99
- LC_CTYPE=en_US.UTF-8
1010
- LANG=en_US.UTF-8
1111
matrix:
12-
- TEST_TYPE=ios
13-
- TEST_TYPE=osx
14-
- TEST_TYPE=deployment
15-
- TEST_TYPE=starters
16-
- TEST_TYPE=podspecs
12+
- TEST_TYPE=iOS
13+
- TEST_TYPE=OSX
14+
- TEST_TYPE=Deployment
15+
- TEST_TYPE=Starters
16+
- TEST_TYPE=CocoaPods
17+
- TEST_TYPE=Carthage
1718
git:
1819
submodules: false
1920
before_install:
@@ -22,9 +23,15 @@ install:
2223
- |
2324
if [ -n "$TEST_TYPE" ]; then
2425
bundle install
26+
if [ "$TEST_TYPE" == "Carthage" ]; then
27+
brew update
28+
brew install carthage
29+
fi
2530
fi
2631
script:
27-
- bundle exec rake test:$TEST_TYPE
32+
- |
33+
TEST_TYPE=$(echo "$TEST_TYPE" | tr '[:upper:]' '[:lower:]')
34+
bundle exec rake test:$TEST_TYPE
2835
after_success:
2936
- |
3037
if [ "$TEST_TYPE" = "ios" ] || [ "$TEST_TYPE" = "osx" ]; then

Rakefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ namespace :test do
419419
end
420420

421421
desc 'Run Podspec Lint'
422-
task :podspecs do |_|
422+
task :cocoapods do |_|
423423
podspecs = ['Parse.podspec']
424424
results = []
425425
system("pod repo update --silent")
@@ -434,4 +434,12 @@ namespace :test do
434434
end
435435
end
436436
end
437+
438+
desc 'Run Carthage Build'
439+
task :carthage do |_|
440+
if !system('carthage build --no-skip-current')
441+
puts 'Carthage Tests Failed!'
442+
exit(1)
443+
end
444+
end
437445
end

0 commit comments

Comments
 (0)