-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
32 lines (23 loc) · 954 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
# ------------------------------------------------------------
# Rails
require File.expand_path('config/application', __dir__)
Rails.application.load_tasks
# ------------------------------------------------------------
# Setup
task setup: %w[assets:precompile]
# ------------------------------------------------------------
# Check (setup + coverage)
desc 'Set up, check test coverage'
task :check do
ENV['RAILS_ENV'] = 'test'
Rake::Task[:setup].invoke
Rake::Task[:coverage].invoke
end
# ------------------------------------------------------------
# Defaults
# Clear Minitest default :test tasks
%w[test test:db test:system].each { |t| Rake::Task[t].clear if Rake::Task.task_defined?(t) }
# clear rspec/rails default :spec task
Rake::Task[:default].clear if Rake::Task.task_defined?(:default)
desc 'Set up, run tests, check code style, check test coverage, check for vulnerabilities'
task default: %i[check rubocop brakeman bundle:audit]