-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathRakefile
More file actions
85 lines (72 loc) · 2.01 KB
/
Rakefile
File metadata and controls
85 lines (72 loc) · 2.01 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
namespace :dev do
desc "DEV: Initialize Project"
namespace :init do
task_name = ["start", "format", "lint"]
descriptions = ["Initializing" "Formatting", "Running Linters"]
task_name.each_with_index do |dev_task, index|
desc "DEV: #{descriptions[index]} VAF Python Project"
task dev_task.split("-")[0] do
Dir.chdir("VAF") do
sh "make #{dev_task}"
end
end
end
desc "DEV: #{descriptions[1]} and #{descriptions[2]} VAF Python Project"
task precommit: %i[format lint]
end
desc "DEV: Run test suites in Project"
namespace :test do
namespace :unit do
unit_tests = ["cli-core", "vafgeneration", "vafmodel", "vafpy", "vafvssimport"]
unit_tests.each do |ut|
desc "DEV: Run Unit Test for #{ut} in Project"
task ut do
Dir.chdir("VAF") do
sh "make test-unit-#{ut}"
end
end
end
desc "DEV: Run ALL Unit Test in Project"
task :all do
Dir.chdir("VAF") do
sh "make test-unit"
end
end
end
namespace :component do
comp_tests = ["cli", "scenario"]
comp_tests.each do |ct|
desc "DEV: Run Component Test for #{ct} in Project"
task ct do
Dir.chdir("VAF") do
sh "make test-component-#{ct}"
end
end
end
desc "DEV: Run ALL Component Test in Project"
task :all do
Dir.chdir("VAF") do
sh "make test-component"
end
end
end
desc "DEV: Run ALL test suites in Project"
task all: %i[unit:all component:all]
end
desc "DEV: Rake job for Pipeline"
task pipeline: %i[init:precommit test:all]
end
namespace :prod do
namespace :install do
desc 'PROD: Install vaf wheel with uv'
task :vafcli do
path_to_vafinstall = "_vafinstall"
FileUtils.rm_rf(path_to_vafinstall)
FileUtils.mkdir_p(path_to_vafinstall)
Dir.chdir("VAF") do
sh 'make clean build'
sh 'make install'
end
end
end
end