diff options
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/travis.rb | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/ci/travis.rb b/ci/travis.rb index b03ac4fe35..b62f90a59e 100755 --- a/ci/travis.rb +++ b/ci/travis.rb @@ -20,7 +20,9 @@ class Build 'am' => 'actionmailer', 'amo' => 'activemodel', 'as' => 'activesupport', - 'ar' => 'activerecord' + 'ar' => 'activerecord', + 'av' => 'actionview', + 'aj' => 'activejob' } attr_reader :component, :options @@ -46,14 +48,15 @@ class Build heading = [gem] heading << "with #{adapter}" if activerecord? heading << "in isolation" if isolated? + heading << "integration" if integration? heading.join(' ') end def tasks if activerecord? - ['mysql:rebuild_databases', "#{adapter}:#{'isolated_' if isolated?}test"] + ['db:mysql:rebuild', "#{adapter}:#{'isolated_' if isolated?}test"] else - ["test#{':isolated' if isolated?}"] + ["test", ('isolated' if isolated?), ('integration' if integration?)].compact.join(":") end end @@ -72,6 +75,10 @@ class Build options[:isolated] end + def integration? + component.split(':').last == 'integration' + end + def gem MAP[component.split(':').first] end @@ -91,11 +98,18 @@ class Build end end +if ENV['GEM']=='aj:integration' + ENV['QC_DATABASE_URL'] = 'postgres://postgres@localhost/active_jobs_qc_int_test' + ENV['QUE_DATABASE_URL'] = 'postgres://postgres@localhost/active_jobs_que_int_test' +end + results = {} ENV['GEM'].split(',').each do |gem| [false, true].each do |isolated| + next if ENV['TRAVIS_PULL_REQUEST'] && ENV['TRAVIS_PULL_REQUEST'] != 'false' && isolated next if gem == 'railties' && isolated + next if gem == 'aj:integration' && isolated build = Build.new(gem, :isolated => isolated) results[build.key] = build.run! @@ -109,7 +123,7 @@ end # puts " #{`uname -a`}" # puts " #{`ruby -v`}" # puts " #{`mysql --version`}" -# # puts " #{`pg_config --version`}" +# puts " #{`pg_config --version`}" # puts " SQLite3: #{`sqlite3 -version`}" # `gem env`.each_line {|line| print " #{line}"} # puts " Bundled gems:" @@ -117,7 +131,7 @@ end # puts " Local gems:" # `gem list`.each_line {|line| print " #{line}"} -failures = results.select { |key, value| value == false } +failures = results.select { |key, value| !value } if failures.empty? puts @@ -126,6 +140,6 @@ if failures.empty? else puts puts "Rails build FAILED" - puts "Failed components: #{failures.map { |component| component.first }.join(', ')}" + puts "Failed components: #{failures.map(&:first).join(', ')}" exit(false) end |