Created
November 15, 2014 16:04
-
-
Save nafu/99e8dc51fcc5d28da97c to your computer and use it in GitHub Desktop.
werker.yml for rails
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
box: nafu/[email protected] | |
# Build definition | |
# See the Rails section on the wercker devcenter: | |
# http://devcenter.wercker.com/articles/languages/ruby/settingup-rails4.html | |
# You will want to define your database as follows: | |
services: | |
- wercker/postgresql | |
# See more about services on our devcenter: | |
# http://devcenter.wercker.com/articles/services/ | |
build: | |
steps: | |
# Uncomment this to force RVM to use a specific Ruby version | |
# - rvm-use: | |
# version: 2.1.0 | |
# A step that executes `bundle install` command | |
- bundle-install | |
# A step that prepares the database.yml using the database in services | |
- rails-database-yml: | |
service: postgresql | |
# A custom script step, name value is used in the UI | |
# and the code value contains the command that get executed | |
- script: | |
name: echo ruby information | |
code: | | |
echo "ruby version $(ruby --version) running" | |
echo "from location $(which ruby)" | |
echo -p "gem list: $(gem list)" | |
# Add more steps here: | |
- script: | |
name: update rake | |
code: bundle update | |
- script: | |
name: set up db | |
code: RAILS_ENV=test bundle exec rake db:schema:load | |
- script: | |
name: rspec and cucumber | |
code: | | |
bundle exec rspec --format html > $WERCKER_REPORT_ARTIFACTS_DIR/rspec.html | |
bundle exec cucumber --format html > $WERCKER_REPORT_ARTIFACTS_DIR/scenario.html | |
mv $WERCKER_ROOT/coverage $WERCKER_REPORT_ARTIFACTS_DIR | |
deploy: | |
steps: | |
- heroku-deploy: | |
run: rake db:migrate; rake db:seed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment