-
Notifications
You must be signed in to change notification settings - Fork 78
/
Rakefile
30 lines (23 loc) · 691 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
# frozen_string_literal: true
require "bundler/gem_tasks"
desc "Run tests"
task :test do
rm_rf "coverage"
rm_rf "gemfiles"
Bundler.with_original_env do
sh "bundle exec appraisal generate"
# XXX: `bundle exec appraisal install` fails on ruby-3.2
Dir["gemfiles/*.gemfile"].each do |gemfile|
sh({ "BUNDLE_GEMFILE" => gemfile }, "bundle lock")
sh({ "BUNDLE_GEMFILE" => gemfile }, "bundle check") do |ok|
sh({ "BUNDLE_GEMFILE" => gemfile }, "bundle install") unless ok
end
end
sh "bundle exec appraisal rspec --force-colour"
end
end
desc "Lint codebase"
task :lint do
sh "bundle exec rubocop --color"
end
task default: %i[test lint]