aboutsummaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authoryui-knk <spiketeika@gmail.com>2015-12-19 13:45:40 +0900
committeryui-knk <spiketeika@gmail.com>2015-12-22 00:55:13 +0900
commitbf8ca88b91225dc66c15e88acf438327b47344bb (patch)
treeccbe1d5f6069fec9aedbb73a5fd0580d411107b3 /ci
parent1611ab4db173a7596a7a94c58dabf1483f070304 (diff)
downloadrails-bf8ca88b91225dc66c15e88acf438327b47344bb.tar.gz
rails-bf8ca88b91225dc66c15e88acf438327b47344bb.tar.bz2
rails-bf8ca88b91225dc66c15e88acf438327b47344bb.zip
Use an appropriate rebuild task on Travis
Use `db:mysql:rebuild` when testing mysql2, `db:postgresql:rebuild` when testing postgresql and no rebuild task when testing others.
Diffstat (limited to 'ci')
-rwxr-xr-xci/travis.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/ci/travis.rb b/ci/travis.rb
index 608a6f578e..e9a3626b9a 100755
--- a/ci/travis.rb
+++ b/ci/travis.rb
@@ -60,7 +60,14 @@ class Build
def tasks
if activerecord?
- ['db:mysql:rebuild', "#{adapter}:#{'isolated_' if isolated?}test"]
+ tasks = ["#{adapter}:#{'isolated_' if isolated?}test"]
+ case adapter
+ when 'mysql2'
+ tasks.unshift 'db:mysql:rebuild'
+ when 'postgresql'
+ tasks.unshift 'db:postgresql:rebuild'
+ end
+ tasks
else
["test", ('isolated' if isolated?), ('integration' if integration?)].compact.join(":")
end