diff --git a/.travis.yml b/.travis.yml index 1fe3635..47bee4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,9 +37,16 @@ matrix: - env: RAILS=5-2-stable DB=mysql - env: RAILS=5-2-stable DB=postgres before_script: - - mysql -e 'create database ransack collate utf8_general_ci;' - - mysql -e 'use ransack;show variables like "%character%";show variables like "%collation%";' - - psql -c 'create database ransack;' -U postgres + - if [ "$DB" = "mysql" ]; + then + mysql -e 'create database ransack collate utf8_general_ci;'; + mysql -e 'use ransack;show variables like "%character%";show variables like "%collation%";'; + fi + + - if [ "$DB" = "postgres" ]; + then + psql -c 'create database ransack;' -U postgres; + fi addons: code_climate: