forked from calagator/calagator
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split out database testing into separate CI runs
Fixes calagator#53 Previously, we were running `rake spec:db:all` on CI, which ran our test suite using mysql, postgresql, and sqlite3, but didn't provide very much visibility into which databases were passing or failing. This change moves to using Travis to set a DB environment variable and then running `rake spec` under each environment.
- Loading branch information
Showing
5 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
require 'fileutils' | ||
|
||
which_config = "ci/database.#{ENV['DB'] || 'sqlite'}.yml" | ||
|
||
puts "Copying database configuration for CI: #{which_config}" | ||
FileUtils.cp which_config, 'config/database~custom.yml' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
test: | ||
adapter: mysql2 | ||
database: calagator_test | ||
username: travis | ||
encoding: utf8 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
test: | ||
adapter: postgresql | ||
database: calagator_test | ||
username: postgres |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
test: | ||
adapter: sqlite3 | ||
database: db/test.sqlite3 | ||
timeout: 500 | ||
|