Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

Merge #235 - Travis CI implementation #641

Merged
merged 8 commits into from
Jul 8, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: ruby
rvm:
- 2.1.1
- 1.9.3
before_script:
- cp config/database.travis.yml config/database.yml
- CODECLIMATE_REPO_TOKEN=075afb721fe089e1b77ab194fcff1ac132765bbfd3f3777db52f7abaf9bf800d
- bundle exec rake db:create
- bundle exec rake db:migrate
- bundle exec rake db:test:prepare
41 changes: 41 additions & 0 deletions config/database.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This database.yml is for use by Travis CI. All this information must be
# provided so Travis CI can actually build and test our app. It cannot
# be removed and replaced by a database.yml.example file, because this is
# configuration information necessary for Travis CI to build the app. For more
# information, see http://docs.travis-ci.com/user/database-setup/#MySQL
#
# It is possible that with any further changes in the future we'll need to
# update this configuration for Travis CI to build. Always check the Travis CI
# build status for the latest information.
# ==============================================================================

development:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file should be added to the git-ignore file, and copied to a database.travis.yml.example file (just like database.yml), and this info added to appropriate documentation. database setups will vary and we don't want to assume mysql2 with these default settings. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately that's not how it works. This file is for Travis CI's VMs, and is necessary for automatic builds. There can't be a .example file because this isn't for human setup, it's only for Travis CI.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I see, I didn't realize Travis CI is a hosted service and doesn't use our databases. Can we add that to a comment in the top line, for documentation/clarity?

adapter: mysql2
encoding: utf8
reconnect: false
database: reservations_development
pool: 5
username: root
password:
host: localhost

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: mysql2
encoding: utf8
reconnect: false
database: reservations_test
pool: 5
username: root
password:

production:
adapter: mysql2
encoding: utf8
reconnect: false
database: reservations_production
pool: 5
username: root
password: