diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..474ca17c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +branches: + only: + - 'master' +rvm: 1.9.2 +before_script: + - "bundle exec rake db:seed_fu RAILS_ENV=test" + - "sh -e /etc/init.d/xvfb start" +script: "bundle exec rake travis" diff --git a/lib/tasks/travis.rake b/lib/tasks/travis.rake new file mode 100644 index 00000000..30392a07 --- /dev/null +++ b/lib/tasks/travis.rake @@ -0,0 +1,7 @@ +task :travis do + ["rspec spec"].each do |cmd| + puts "Starting to run #{cmd}..." + system("export DISPLAY=:99.0 && bundle exec #{cmd}") + raise "#{cmd} failed!" unless $?.exitstatus == 0 + end +end