2016-02-14 22:47:29 -05:00
|
|
|
namespace :ci do
|
|
|
|
|
desc 'Continuous integration tests, without features'
|
|
|
|
|
task :lite do
|
|
|
|
|
ENV['RAILS_ENV'] ||= "test"
|
2013-09-24 09:48:21 +02:00
|
|
|
|
2016-02-14 22:47:29 -05:00
|
|
|
puts 'Running "lite" test suite'
|
2013-09-24 09:48:21 +02:00
|
|
|
|
2016-02-14 22:47:29 -05:00
|
|
|
[:environment, 'db:create', 'test:all'].each do |t|
|
|
|
|
|
Rake::Task[t].invoke
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
desc 'Continuous integration tests, including features'
|
|
|
|
|
task :full do |t|
|
|
|
|
|
puts 'Running full test suite'
|
|
|
|
|
|
|
|
|
|
# test coverage from codeclimate
|
|
|
|
|
require "codeclimate-test-reporter"
|
|
|
|
|
CodeClimate::TestReporter.start
|
2013-09-24 09:48:21 +02:00
|
|
|
|
2016-02-14 22:47:29 -05:00
|
|
|
# local test coverage
|
|
|
|
|
require 'simplecov'
|
|
|
|
|
SimpleCov.start 'rails'
|
|
|
|
|
|
|
|
|
|
['ci:lite', 'cucumber'].each do |t|
|
|
|
|
|
Rake::Task[t].invoke
|
|
|
|
|
end
|
2013-09-24 09:48:21 +02:00
|
|
|
end
|
2014-06-10 15:57:29 -04:00
|
|
|
end
|
2016-02-14 22:47:29 -05:00
|
|
|
|
|
|
|
|
desc 'Alias for ci:full'
|
|
|
|
|
task :ci => 'ci:full'
|