Last active
December 29, 2015 00:09
-
-
Save phlco/7584448 to your computer and use it in GitHub Desktop.
travis rake task for jasmine and rspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: ruby | |
rvm: | |
- 1.9.3 | |
before_script: | |
- "sh -e /etc/init.d/xvfb start" | |
- "export DISPLAY=:99.0" | |
- "export JASMINE_SPEC_FORMAT=documentation" | |
script: | |
- "bundle exec rake travis:run" | |
env: | |
- PG_USERNAME='postgres' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group :development, :test do | |
gem 'coveralls', require: false | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# must occur before any of your application code is required | |
require 'coveralls' | |
Coveralls.wear_merged! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'coveralls/rake/task' | |
Coveralls::RakeTask.new | |
namespace :travis do | |
desc "Prepare DB and run Tests" | |
task :run do | |
["db:create", "db:migrate RAILS_ENV=test", "spec", "jasmine:ci", "coveralls:push"].each do |cmd| | |
puts "Starting to run #{cmd}..." | |
system("bundle exec rake #{cmd}") | |
raise "#{cmd} failed!" unless $?.exitstatus == 0 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment