From 18b1f360d889b5954d44a68f5490240bcb12defe Mon Sep 17 00:00:00 2001 From: Sarah Mei <sarahmei@gmail.com> Date: Sat, 17 Sep 2011 22:39:42 -0700 Subject: [PATCH] Have our CI run only cucumber --- ci-19.sh | 9 +++++---- ci.sh | 9 +++++---- lib/tasks/{cruise.rake => ci.rake} | 30 ++++++++++++++++-------------- 3 files changed, 26 insertions(+), 22 deletions(-) rename lib/tasks/{cruise.rake => ci.rake} (77%) diff --git a/ci-19.sh b/ci-19.sh index ecaf1deee6..f876ec1d39 100755 --- a/ci-19.sh +++ b/ci-19.sh @@ -1,11 +1,12 @@ #!/bin/bash -echo "*************************************************************************************************" && -echo "* ruby 1.9.2-p0 build *" && -echo "*************************************************************************************************" && +echo "*********************************************************************************" && +echo "* ruby 1.9.2-p0 build *" && +echo "* Runs tests we can't run on travis because their VMs are a bit puny. *" && +echo "*********************************************************************************" && echo "" && rm -f Gemfile.lock && source /usr/local/rvm/scripts/rvm && rvm use ruby-1.9.2-p0@diaspora --create && bundle install && -CI=true bundle exec rake cruise +CI=true bundle exec rake ci:hard_things diff --git a/ci.sh b/ci.sh index ee1685ea52..645bc9d4d9 100755 --- a/ci.sh +++ b/ci.sh @@ -1,8 +1,9 @@ #!/bin/bash -echo "*************************************************************************************************" && -echo "* ruby 1.8.7 REE build *" && -echo "*************************************************************************************************" && +echo "*********************************************************************************" && +echo "* ruby 1.8.7 REE build *" && +echo "* Runs tests we can't run on travis because their VMs are a bit puny. *" && +echo "*********************************************************************************" && echo "" && rm -f Gemfile.lock && source /usr/local/rvm/scripts/rvm && @@ -16,4 +17,4 @@ rm -rf /usr/local/rvm/gems/ree-1.8.7-2010.02@diaspora/cache && rm -rf /usr/local/rvm/gems/ree-1.8.7-2010.02@global/cache && rm -rf /usr/local/rvm/gems/ree-1.8.7-2010.02/cache && bundle install && -CI=true bundle exec rake cruise +CI=true bundle exec rake ci:hard_things diff --git a/lib/tasks/cruise.rake b/lib/tasks/ci.rake similarity index 77% rename from lib/tasks/cruise.rake rename to lib/tasks/ci.rake index 7c2f92150d..bd626ed3a0 100644 --- a/lib/tasks/cruise.rake +++ b/lib/tasks/ci.rake @@ -1,10 +1,20 @@ -namespace :cruise do - desc "Run all specs and features" - task :cruise => [:environment, :'cruise:migrate'] do +namespace :ci do + + desc "Run tests in the cloud. ZOMG!" + task :travis do + ["rspec spec", "rake jasmine:ci", "rake cucumber"].each do |cmd| + puts "Starting to run #{cmd}..." + system("export DISPLAY=:99.0 && bundle exec #{cmd}") + raise "#{cmd} failed!" unless $?.exitstatus == 0 + end + end + + desc "Run tests that can't run on travis" + task :hard_things => [:environment, :'ci:migrate'] do puts "Starting virtual display..." `sh -e /etc/init.d/xvfb start` puts "Starting specs..." - system('export DISPLAY=:99.0 && CI=true bundle exec rake') + system('export DISPLAY=:99.0 && CI=true bundle exec rake cucumber') exit_status = $?.exitstatus puts "Stopping virtual display..." `sh -e /etc/init.d/xvfb stop` @@ -19,14 +29,6 @@ namespace :cruise do system('bundle exec rake db:test:prepare') raise "migration failed!" unless $?.exitstatus == 0 end - - task :travis do - ["rspec spec", "rake jasmine:ci", "rake cucumber"].each do |cmd| - puts "Starting to run #{cmd}..." - system("export DISPLAY=:99.0 && bundle exec #{cmd}") - raise "#{cmd} failed!" unless $?.exitstatus == 0 - end - end end -task :cruise => "cruise:cruise" -task :travis => "cruise:travis" + +task :travis => "ci:travis" -- GitLab