1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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.
This commit is contained in:
yui-knk 2015-12-19 13:45:40 +09:00
parent 1611ab4db1
commit bf8ca88b91

View file

@ -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