I am working on a Ruby on Rails app. We are using sqlite database adapter for local development and testing, and postgresql adapter for production environment. I have set up my database.yml to access these databases correctly.
However, we do continous integration with Travis CI. When I push a new commit, I want Travis to perform all tests against a postgresql database, what basically means exchanging the adapter for the test environment.
What I came up with currently is using environment variables for all options in the test environment in the database.yml, using default values pointing to sqlite3 when environment variables are not set.
However, I'm wondering if there is a solution to reflect this directly in database.yml
Aucun commentaire:
Enregistrer un commentaire