forked from criteo-cookbooks/rundeck-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
29 lines (25 loc) · 739 Bytes
/
Rakefile
File metadata and controls
29 lines (25 loc) · 739 Bytes
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
require 'rspec/core/rake_task'
require 'kitchen'
require 'foodcritic'
FoodCritic::Rake::LintTask.new
RSpec::Core::RakeTask.new(:rspec)
desc 'Run kitchen tests'
task :test_kitchen do
Kitchen.logger = Kitchen.default_file_logger
@loader = Kitchen::Loader::YAML.new(project_config: './.kitchen.ec2.yml')
config = Kitchen::Config.new(loader: @loader)
if ENV['KITCHEN_NO_CONCURRENCY']
config.instances.each do |instance|
instance.test(:always)
end
else
threads = []
config.instances.each do |instance|
threads << Thread.new { instance.test(:always) }
end
threads.map(&:join)
end
end
tasks = [:foodcritic, :rspec]
tasks << :test_kitchen if ENV['encrypted_5b96b54c695c_iv']
task default: tasks