-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
executable file
·58 lines (46 loc) · 1.26 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
#!/usr/bin/env rake
# frozen_string_literal: true
require 'foodcritic'
require 'rubocop/rake_task'
require 'rspec/core/rake_task'
require 'ci/reporter/rake/rspec'
require 'kitchen/rake_tasks'
require 'knife_cookbook_doc/rake_task'
require 'stove/rake_task'
cookbook_dir = __dir__
ENV['BERKSHELF_PATH'] = cookbook_dir + '/.berkshelf'
ENV['CI_REPORTS'] = cookbook_dir + '/reports'
FoodCritic::Rake::LintTask.new do |t|
t.options = {
progress: true,
fail_tags: %w[any]
}
end
RuboCop::RakeTask.new { |t| t.fail_on_error = true }
RSpec::Core::RakeTask.new(:spec => ['ci:setup:rspec'])
Kitchen::RakeTasks.new
KnifeCookbookDoc::RakeTask.new(:doc) do |task|
task.options[:cookbook_dir] = './'
task.options[:constraints] = true
task.options[:output_file] = 'README.md'
end
Stove::RakeTask.new do |task|
task.stove_opts = ['--extended-metadata', '--no-ssl-verify']
end
task default: 'quick'
desc 'Run all of the quick tests.'
task :quick do
Rake::Task['doc'].invoke
Rake::Task['rubocop'].invoke
Rake::Task['foodcritic'].invoke
Rake::Task['spec'].invoke
end
desc 'Run _all_ the tests. Go get a coffee.'
task :complete do
Rake::Task['quick'].invoke
Rake::Task['kitchen:all'].invoke
end
desc 'Run CI tests'
task :ci do
Rake::Task['complete'].invoke
end