Skip to content

Instantly share code, notes, and snippets.

@yorzi
Created May 17, 2013 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yorzi/5597975 to your computer and use it in GitHub Desktop.
Save yorzi/5597975 to your computer and use it in GitHub Desktop.
combine the tasks for CI.
namespace :ci do
task :copy_yml do
sh "cp #{Rails.root}/config/example_database.yml #{Rails.root}/config/database.yml"
sh "other preparation"
end
desc "Prepare for CI and run entire test suite"
task :build do
Rake::Task['db:migrate'].invoke
Rake::Task['db:test:prepare'].invoke
Rake::Task['test:units'].invoke
Rake::Task['cucumber:ci'].invoke
end
task :deploy do
sh "cap staging deploy"
end
desc "Prepare for CI and run entire test suite"
task :run => ['ci:copy_yml', 'ci:build', 'ci:deploy'] do
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment