forked from sous-chefs/percona
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
38 lines (31 loc) · 828 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
28
29
30
31
32
33
34
35
36
37
38
task default: "test"
desc "Run all tests except `kitchen`"
task test: [:rubocop, :foodcritic, :chefspec]
desc "Run all tests"
task all_tests: [
:license_finder, :rubocop, :foodcritic, :chefspec, "kitchen:all"
]
# license finder
task :license_finder do
sh "bundle exec license_finder --quiet"
end
# rubocop style checker
require "rubocop/rake_task"
RuboCop::RakeTask.new
# foodcritic chef lint
require "foodcritic"
FoodCritic::Rake::LintTask.new do |t|
t.options = { fail_tags: ["any"] }
end
# chefspec unit tests
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:chefspec) do |t|
t.rspec_opts = "--color --format progress"
end
# test-kitchen integration tests
begin
require "kitchen/rake_tasks"
Kitchen::RakeTasks.new
rescue LoadError
task("kitchen:all") { puts "Unable to run `test-kitchen`" }
end