-
Notifications
You must be signed in to change notification settings - Fork 43
/
Rakefile
44 lines (37 loc) · 1.14 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
require 'rake/testtask'
require "bundler/gem_tasks"
load 'tasks/jenkins.rake'
Rake::TestTask.new('test:ruby') do |t|
t.libs << 'lib' << 'test'
t.test_files = FileList['test/**/*_test.rb'] - FileList['test/tmp/**/*_test.rb']
t.verbose = true
end
Rake::TestTask.new('test:unit') do |t|
t.libs << 'lib' << 'test'
t.test_files = FileList['test/kafo/**/*_test.rb']
t.verbose = true
end
Rake::TestTask.new('test:acceptance') do |t|
t.libs << 'lib' << 'test'
t.test_files = FileList['test/acceptance/*_test.rb']
t.verbose = true
end
namespace 'test' do
desc 'Run Puppet module tests'
task :puppet_modules do
Dir['modules/*'].each do |mod|
Dir.chdir(mod) do
`rake release_checks`
end
end
end
end
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:rubocop) do |task|
# These make the rubocop experience maybe slightly less terrible
task.options = ['--display-cop-names', '--display-style-guide', '--extra-details']
# Use Rubocop's Github Actions formatter if possible
task.formatters << 'github' if ENV['GITHUB_ACTIONS'] == 'true'
end
CLEAN.include 'test/tmp'
task :test => ['test:ruby', 'test:puppet_modules']