diff options
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/travis.rb | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/ci/travis.rb b/ci/travis.rb index 956a01dbee..b62f90a59e 100755 --- a/ci/travis.rb +++ b/ci/travis.rb @@ -21,7 +21,8 @@ class Build 'amo' => 'activemodel', 'as' => 'activesupport', 'ar' => 'activerecord', - 'av' => 'actionview' + 'av' => 'actionview', + 'aj' => 'activejob' } attr_reader :component, :options @@ -47,6 +48,7 @@ class Build heading = [gem] heading << "with #{adapter}" if activerecord? heading << "in isolation" if isolated? + heading << "integration" if integration? heading.join(' ') end @@ -54,7 +56,7 @@ class Build if activerecord? ['db:mysql:rebuild', "#{adapter}:#{'isolated_' if isolated?}test"] else - ["test#{':isolated' if isolated?}"] + ["test", ('isolated' if isolated?), ('integration' if integration?)].compact.join(":") end end @@ -73,6 +75,10 @@ class Build options[:isolated] end + def integration? + component.split(':').last == 'integration' + end + def gem MAP[component.split(':').first] end @@ -92,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! @@ -127,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 |