forked from Azure/terraform-azurerm-network-security-group
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
54 lines (42 loc) · 971 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Official gems.
require 'colorize'
require 'rspec/core/rake_task'
# Git repo gems.
require 'bundler/setup'
require 'terramodtest'
namespace :presteps do
task :ensure do
puts "Using dep ensure to install required go packages.\n"
success = system ("dep ensure")
if not success
raise "ERROR: Dep ensure failed!\n".red
end
end
end
namespace :static do
task :style do
style_tf
end
task :lint do
lint_tf
end
task :format do
format_tf
end
end
namespace :integration do
task :test do
success = system ("go test -v ./test/ -timeout 20m")
if not success
raise "ERROR: Go test failed!\n".red
end
end
end
task :prereqs => [ 'presteps:ensure' ]
task :validate => [ 'static:style', 'static:lint' ]
task :format => [ 'static:format' ]
task :build => [ 'prereqs', 'validate' ]
task :unit => []
task :e2e => [ 'integration:test' ]
task :default => [ 'build' ]
task :full => [ 'build', 'unit', 'e2e' ]