Skip to content

Instantly share code, notes, and snippets.

@nafu
Created November 15, 2014 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nafu/99e8dc51fcc5d28da97c to your computer and use it in GitHub Desktop.
Save nafu/99e8dc51fcc5d28da97c to your computer and use it in GitHub Desktop.
werker.yml for rails
box: nafu/ubuntu12.04-ruby2.1.1@1.0.1
# 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