From 1eaf810548c75c1517639df24cf318f8f3e715e2 Mon Sep 17 00:00:00 2001 From: Hernan Schmidt Date: Mon, 22 Aug 2016 16:39:19 +0200 Subject: [PATCH] In Travis, run tests on MariaDB --- .travis.yml | 5 ++++- config/database.yml.travis | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 config/database.yml.travis diff --git a/.travis.yml b/.travis.yml index 10af790e..ae8030b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ rvm: before_install: - "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" - "echo `phantomjs -v`" +addons: + mariadb: '10.1' notifications: email: on_success: change @@ -17,8 +19,9 @@ notifications: on_success: change on_failure: change before_script: - - cp config/database.yml.example config/database.yml + - cp config/database.yml.travis config/database.yml - cp config/secrets.yml.example config/secrets.yml + - mysql -u root -e 'create database osem_test;' - RAILS_ENV=test bundle exec rake db:migrate --trace script: - 'bundle exec rubocop -Dc .rubocop.yml' diff --git a/config/database.yml.travis b/config/database.yml.travis new file mode 100644 index 00000000..c0410217 --- /dev/null +++ b/config/database.yml.travis @@ -0,0 +1,5 @@ +test: + adapter: mysql2 + database: osem_test + username: root + encoding: utf8