Sha256: 0bf6d490a1d203749fce7cb271fd10b0f759c3a46c156f41f3f4f2b4de3ec84d

Contents?: true

Size: 921 Bytes

Versions: 5

Compression:

Stored size: 921 Bytes

Contents

require 'rspec/core'
require 'rspec/core/rake_task'
require 'jettywrapper'
require 'engine_cart/rake_task'
require 'rubocop/rake_task'

Jettywrapper.hydra_jetty_version = "v8.6.0"

desc 'Run style checker'
RuboCop::RakeTask.new(:rubocop) do |task|
  task.requires << 'rubocop-rspec'
  task.fail_on_error = true
end

desc 'Run specs and style checker'
task :spec do
  Rake::Task['rubocop'].invoke
  RSpec::Core::RakeTask.new(:spec)
end

desc 'Spin up hydra-jetty and run specs'
task ci: ['engine_cart:generate', 'jetty:clean', 'sufia:jetty:config'] do
  puts 'running continuous integration'
  # No need to maintain minter state on Travis
  reset_statefile! if ENV['TRAVIS'] == 'true'
  jetty_params = Jettywrapper.load_config
  error = Jettywrapper.wrap(jetty_params) do
    Rake::Task['spec'].invoke
  end
  raise "test failures: #{error}" if error
end

 def reset_statefile!
   FileUtils.rm_f('/tmp/minter-state')
 end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sufia-6.7.0 tasks/sufia-dev.rake
sufia-6.6.1 tasks/sufia-dev.rake
sufia-6.6.0 tasks/sufia-dev.rake
sufia-6.5.0 tasks/sufia-dev.rake
sufia-6.4.0 tasks/sufia-dev.rake