forked from Azure/terraform-azurerm-compute
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
50 lines (39 loc) · 913 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
# Official gems.
require 'colorize'
require 'rspec/core/rake_task'
# Git repo gems.
require 'bundler/setup'
require 'terramodtest'
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 :ensure do
success = system ("dep ensure")
if not success
raise "ERROR: Dep ensure failed!\n".red
end
end
task :test do
success = system ("go test -v ./test/ -timeout 20m -args azureuser ~/.ssh/id_rsa")
if not success
raise "ERROR: Go test failed!\n".red
end
end
end
task :prereqs => []
task :validate => [ 'static:style', 'static:lint' ]
task :format => [ 'static:format' ]
task :build => [ 'prereqs', 'validate' ]
task :unit => []
task :e2e => [ 'integration:ensure', 'integration:test' ]
task :default => [ 'build' ]
task :full => [ 'build', 'unit', 'e2e' ]