-
Notifications
You must be signed in to change notification settings - Fork 25
/
Rakefile
47 lines (38 loc) · 1.07 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env rake
require "bundler/gem_tasks"
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
require 'solr_wrapper/rake_task'
require 'fcrepo_wrapper'
require 'active_fedora/rake_support'
require 'rubocop/rake_task'
namespace :derivatives do
desc 'Run style checker'
RuboCop::RakeTask.new(:rubocop) do |task|
task.requires << 'rubocop-rspec'
task.fail_on_error = true
end
RSpec::Core::RakeTask.new(:rspec) do |task|
task.rspec_opts = "--tag ~requires_kdu_compress" if ENV['CI']
end
desc 'Start up Solr & Fedora and run tests'
task :spec do
with_test_server do
Rake::Task['derivatives:rspec'].invoke
end
end
desc 'Start up test server'
task :test_server do
ENV["RAILS_ENV"] = "test"
with_test_server do
puts "Solr: http://localhost:#{ENV["SOLR_TEST_PORT"]}/solr"
puts "Fedora: http://localhost:#{ENV["FCREPO_TEST_PORT"]}/rest"
while(1) do
sleep(1)
end
end
end
end
desc 'Run continuous integration build'
task ci: ['derivatives:rubocop', 'derivatives:spec']
task default: :ci