Skip to content
Extraits de code Groupes Projets
Valider 18b1f360 rédigé par Sarah Mei's avatar Sarah Mei
Parcourir les fichiers

Have our CI run only cucumber

parent 661d5d3b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
#!/bin/bash #!/bin/bash
echo "*************************************************************************************************" && echo "*********************************************************************************" &&
echo "* ruby 1.9.2-p0 build *" && echo "* ruby 1.9.2-p0 build *" &&
echo "*************************************************************************************************" && echo "* Runs tests we can't run on travis because their VMs are a bit puny. *" &&
echo "*********************************************************************************" &&
echo "" && echo "" &&
rm -f Gemfile.lock && rm -f Gemfile.lock &&
source /usr/local/rvm/scripts/rvm && source /usr/local/rvm/scripts/rvm &&
rvm use ruby-1.9.2-p0@diaspora --create && rvm use ruby-1.9.2-p0@diaspora --create &&
bundle install && bundle install &&
CI=true bundle exec rake cruise CI=true bundle exec rake ci:hard_things
#!/bin/bash #!/bin/bash
echo "*************************************************************************************************" && echo "*********************************************************************************" &&
echo "* ruby 1.8.7 REE build *" && echo "* ruby 1.8.7 REE build *" &&
echo "*************************************************************************************************" && echo "* Runs tests we can't run on travis because their VMs are a bit puny. *" &&
echo "*********************************************************************************" &&
echo "" && echo "" &&
rm -f Gemfile.lock && rm -f Gemfile.lock &&
source /usr/local/rvm/scripts/rvm && source /usr/local/rvm/scripts/rvm &&
...@@ -16,4 +17,4 @@ rm -rf /usr/local/rvm/gems/ree-1.8.7-2010.02@diaspora/cache && ...@@ -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@global/cache &&
rm -rf /usr/local/rvm/gems/ree-1.8.7-2010.02/cache && rm -rf /usr/local/rvm/gems/ree-1.8.7-2010.02/cache &&
bundle install && bundle install &&
CI=true bundle exec rake cruise CI=true bundle exec rake ci:hard_things
namespace :cruise do namespace :ci do
desc "Run all specs and features"
task :cruise => [:environment, :'cruise:migrate'] 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..." puts "Starting virtual display..."
`sh -e /etc/init.d/xvfb start` `sh -e /etc/init.d/xvfb start`
puts "Starting specs..." 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 exit_status = $?.exitstatus
puts "Stopping virtual display..." puts "Stopping virtual display..."
`sh -e /etc/init.d/xvfb stop` `sh -e /etc/init.d/xvfb stop`
...@@ -19,14 +29,6 @@ namespace :cruise do ...@@ -19,14 +29,6 @@ namespace :cruise do
system('bundle exec rake db:test:prepare') system('bundle exec rake db:test:prepare')
raise "migration failed!" unless $?.exitstatus == 0 raise "migration failed!" unless $?.exitstatus == 0
end 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 end
task :cruise => "cruise:cruise"
task :travis => "cruise:travis" task :travis => "ci:travis"
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter