-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
40 lines (32 loc) · 1 KB
/
Copy pathRakefile
File metadata and controls
40 lines (32 loc) · 1 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
# frozen_string_literal: true
require 'bundler/gem_tasks'
require 'rake/testtask'
require 'rubocop/rake_task'
require 'yard'
Rake::TestTask.new(:test) do |task|
task.libs << 'test'
task.pattern = 'test/**/*_test.rb'
task.warning = true
end
RuboCop::RakeTask.new(:rubocop) do |task|
task.options = ['--cache', 'false']
end
YARD::Rake::YardocTask.new(:yard)
desc 'Enforce complete public API documentation'
task :yard_coverage do
sh 'bundle exec yard stats --list-undoc --compact | tee /tmp/lambda-microvms-yard-stats'
sh "grep -F '100.00% documented' /tmp/lambda-microvms-yard-stats"
end
namespace :rbs do
desc 'Validate signatures and statically check the implementation'
task :validate do
sh 'bundle exec rbs -I sig validate'
sh 'bundle exec steep check'
end
end
desc 'Run tests with strict line and branch coverage thresholds'
task :coverage do
sh({ 'COVERAGE' => 'true' }, 'bundle exec rake test')
end
task quality: %i[rubocop coverage rbs:validate yard_coverage]
task default: :quality