-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
60 lines (48 loc) · 1.64 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
48
49
50
51
52
53
54
55
56
57
58
59
60
require 'bundler/setup'
ENV['APP_ENV'] ||= 'test'
task :version do
require './lib/version'
puts Version.current
exit 0
end
namespace :db do
require 'sequel'
require_relative 'config/configuration'
Sequel.extension :migration
desc 'Run migrations'
task :migrate do |_t|
logger = Configuration.logger
db = Configuration.db
db.loggers << logger
Sequel::Migrator.run(db, 'db/migrations')
puts '<= sq:migrate:up executed'
end
end
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:rubocop) do |task|
task.options = ['--display-cop-names']
end
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:cucumber) do |task|
task.cucumber_opts = ['features', '--publish-quiet', '--tags \'not @wip\'']
end
Cucumber::Rake::Task.new(:acceptance_report) do |task|
task.cucumber_opts = ['features', '--publish-quiet', '--tags \'not @wip\'', '--format pretty',
'--format html -o reports/cucumber.html']
end
Cucumber::Rake::Task.new(:acceptance_report_remote) do |task|
task.cucumber_opts = ['features', '--publish-quiet', '--tags \'not @wip and not @local\'', '--format pretty',
'--format html -o reports/cucumber.html']
end
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |task|
task.rspec_opts = '--color --format d'
end
RSpec::Core::RakeTask.new(:spec_report) do |t|
t.rspec_opts = %w[--format progress --format RspecJunitFormatter --out reports/spec/rspec.xml]
end
Cucumber::Rake::Task.new(:feature_indev) do |task|
task.cucumber_opts = ['features', '--tags \'@indev\'']
end
task ci: %i[acceptance_report spec_report rubocop]
task default: %i[cucumber spec rubocop]