Make the 'test' task a no-op and advertise other tasks instead

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2021-04-13 18:10:59 +02:00
parent 88c4f65af9
commit b18049b057
No known key found for this signature in database
GPG key ID: 4C514D15D07186F1
2 changed files with 13 additions and 2 deletions

View file

@ -4,6 +4,8 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
Rake::TaskManager.record_task_metadata = true
require File.expand_path('config/application', __dir__)
relative_url_conf = File.expand_path('config/initializers/relative_url', __dir__)

View file

@ -2,7 +2,16 @@
Rake::Task["test"].clear
desc "GitLab | Run all tests"
desc "GitLab | List rake tasks for tests"
task :test do
Rake::Task["gitlab:test"].invoke
puts "Running the full GitLab test suite takes significant time to pass. We recommend using one of the following spec tasks:\n\n"
spec_tasks = Rake::Task.tasks.select { |t| t.name.start_with?('spec:') }
longest_task_name = spec_tasks.map { |t| t.name.size }.max
spec_tasks.each do |task|
puts "#{"%-#{longest_task_name}s" % task.name} | #{task.full_comment}"
end
puts "\nLearn more at https://docs.gitlab.com/ee/development/rake_tasks.html#run-tests."
end