-
Notifications
You must be signed in to change notification settings - Fork 60
/
Rakefile
27 lines (20 loc) · 608 Bytes
/
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
# frozen_string_literal: true
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
$REPO_ROOT = File.dirname(__FILE__)
$VERSION = ENV['VERSION'] || File.read(File.join($REPO_ROOT, 'VERSION')).strip
Dir.glob('**/*.rake').each do |task_file|
load task_file
end
RuboCop::RakeTask.new
RSpec::Core::RakeTask.new(:spec)
task :db_migrate do
Dir.chdir('spec/dummy') do
version = ENV.delete('VERSION') # ActiveRecord uses this
`RAILS_ENV=test rake -I ../../lib db:migrate`
ENV['VERSION'] = version
end
end
task test: %i[db_migrate spec]
task default: :test
task 'release:test' => :test