Created
April 9, 2012 01:28
-
-
Save mceachen/2340726 to your computer and use it in GitHub Desktop.
Travis CI with multiple database engines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: ruby | |
rvm: | |
- 1.9.3 | |
env: | |
- DB=sqlite | |
- DB=mysql | |
- DB=postgresql | |
script: | |
- RAILS_ENV=test bundle exec rake --trace db:migrate test | |
before_script: | |
- mysql -e 'create database chromotype_test' | |
- psql -c 'create database chromotype_test' -U postgres |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sqlite: &sqlite | |
adapter: sqlite3 | |
database: db/<%= Rails.env %>.sqlite3 | |
mysql: &mysql | |
adapter: mysql2 | |
username: root | |
password: | |
database: <%= Rails.root.basename.to_s %>_<%= Rails.env %> | |
postgresql: &postgresql | |
adapter: postgresql | |
username: postgres | |
password: | |
database: <%= Rails.root.basename.to_s %>_<%= Rails.env %> | |
min_messages: ERROR | |
defaults: &defaults | |
pool: 5 | |
timeout: 5000 | |
host: localhost | |
<<: *<%= ENV['DB'] || "postgresql" %> | |
development: | |
<<: *defaults | |
test: | |
<<: *defaults | |
production: | |
<<: *defaults | |
# Change this to erb-echo the production password from /etc/something here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment