Skip to content

Commit

Permalink
see if we can build against other databases
Browse files Browse the repository at this point in the history
  • Loading branch information
acmetech committed Jun 26, 2017
1 parent 2389a00 commit c72f84d
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 8 deletions.
30 changes: 22 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ before_install:


before_script:
- cp travis/database.yml config/database.yml
- bundle update
- bundle exec rails dummy:app --trace
- bundle exec rails app:db:migrate RAILS_ENV=test
Expand All @@ -29,18 +30,31 @@ script:
# - DB=mysql
# - DB=sqlite

rvm:
# - 2.2.4
# - 2.3.3
- 2.4.1
# rvm:
# # - 2.2.4
# # - 2.3.3
# - 2.4.1

gemfile:
- Gemfile
- gemfiles/gemfile.pg
- gemfiles/gemfile.mysql
# gemfile:
# - Gemfile
# - gemfiles/gemfile.pg
# - gemfiles/gemfile.mysql

matrix:
fast_finish: true
include:
- rvm: 2.4.1
gemfile: Gemfile
env: DB=sqlite
- rvm: 2.4.1
gemfile: gemfiles/gemfile.pg
env: DB=postgres
services: postgresql
- rvm: 2.4.1
gemfile: gemfiles/gemfile.mysql
env: DB=mysql
services: mysql

addons:
code_climate:
repo_token: 08c7e43e5cdaf0614c7e61dcf6279865630cb6992fa9f1f09856f72fd641218b
30 changes: 30 additions & 0 deletions travis/database.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
sqlite:
adapter: sqlite3
database: ":memory:"
timeout: 500

mysql:
adapter: mysql2
database: socializer_test
username: travis
encoding: utf8

postgres:
adapter: postgresql
database: travis_ci_test
username: postgres

defaults: &defaults
pool: 5
timeout: 500
host: localhost
<<: *<%= ENV['DB'] || "postgresql" %>

development:
<<: *defaults

test:
<<: *defaults

production:
<<: *defaults

0 comments on commit c72f84d

Please sign in to comment.