-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
32 lines (26 loc) · 854 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
require "bundler/gem_tasks"
require "rake/testtask"
require "standard/rake"
Rake::TestTask.new("test:integration") do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/integration/**/*_test.rb"]
t.warning = false
end
task default: %i[test standard]
desc "Run all tests"
task test: %i[test:integration]
namespace :test do
desc "Prepare to run integration tests"
task :prepare_integration do
ruby_version = ENV["RUBY_VERSION"] || "3.3"
redmine_branch_name = ENV["REDMINE_BRANCH_NAME"] || "master"
image_tag = "rexer-test:#{ruby_version}-#{redmine_branch_name}"
system(<<~CMD, exception: true)
docker build -f test/integration/Dockerfile \
--build-arg RUBY_VERSION=#{ruby_version} \
--build-arg REDMINE_BRANCH_NAME=#{redmine_branch_name} \
-t #{image_tag} .
CMD
end
end