[Travis] Only run on OS X for the examples

parent 3d208c0d
osx_image: xcode7.3
language: objective-c
cache: bundler
matrix:
include:
- rvm: system
env: COCOAPODS_CI_TASKS=EXAMPLES
osx_image: xcode7.3
language: objective-c
- rvm: 2.3.1
env: COCOAPODS_CI_TASKS=LINT
git:
submodules: false
rvm:
# OS X 10.9.5-10.10.0 (2.0.0-p481)
- system
- 2.0.0-p481
# OS X 10.9.3-10.9.4
- 2.0.0-p451
# OS X 10.9.0-10.9.2
......@@ -11,6 +21,9 @@ rvm:
# - 2.0.0-p247
- 2.3.1
env:
- COCOAPODS_CI_TASKS=SPECS
branches:
only:
- master
......@@ -19,16 +32,15 @@ branches:
before_install:
# There is a bug in travis. When using system ruby, bundler is not
# installed and causes the default install action to fail.
- sudo gem install bundler
- if [ "$TRAVIS_RUBY_VERSION" = "system" ]; then sudo gem install "bundler:~> 1.13"; else gem install "bundler:~> 1.13"; fi
# RubyGems 2.0.14 isn't a fun time on 2.0.0p648
- if [ "$(ruby -v | cut -d ' ' -f2)" = "2.0.0p648" ]; then sudo gem update --system; fi
- if [ "$TRAVIS_RUBY_VERSION" = "system" ]; then sudo gem update --system; fi
before_script:
- bundle exec pod repo update --silent
- bundle exec pod env
script:
- bundle exec rake
- bundle exec rake spec:all
- bundle exec danger
addons:
......
......@@ -136,25 +136,40 @@ begin
# to be run separately.
#
task :all => 'fixture_tarballs:unpack' do
tasks = ENV.fetch('COCOAPODS_CI_TASKS') { 'ALL' }.upcase.split(/\s+/)
if %w(ALL SPECS EXAMPLES LINT).&(tasks).empty?
raise "Unknown tasks #{tasks} -- supported options for COCOAPODS_CI_TASKS are " \
'ALL, SPECS, EXAMPLES, LINT'
end
specs = %w(ALL SPECS).&(tasks).any?
examples = %w(ALL EXAMPLES).&(tasks).any?
lint = %w(ALL LINT).&(tasks).any?
# Forcing colored to be included on String before Term::ANSIColor, so that Inch will work correctly.
require 'colored'
ENV['GENERATE_COVERAGE'] = 'true'
puts "\033[0;32mUsing #{`ruby --version`}\033[0m"
title 'Running the specs'
sh "bundle exec bacon #{specs('**/*')}"
if specs
title 'Running the specs'
sh "bundle exec bacon #{specs('**/*')}"
title 'Running Integration tests'
sh 'bundle exec bacon spec/integration.rb'
title 'Running Integration tests'
sh 'bundle exec bacon spec/integration.rb'
end
title 'Running examples'
Rake::Task['examples:build'].invoke
if examples
title 'Running examples'
Rake::Task['examples:build'].invoke
end
title 'Running RuboCop'
Rake::Task['rubocop'].invoke
if lint
title 'Running RuboCop'
Rake::Task['rubocop'].invoke
title 'Running Inch'
Rake::Task['inch'].invoke
title 'Running Inch'
Rake::Task['inch'].invoke
end
end
namespace :fixture_tarballs do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment