Skip to content

Commit

Permalink
Fix Rubocop Rake/Desc
Browse files Browse the repository at this point in the history
  • Loading branch information
archanaserver committed Sep 7, 2023
1 parent 55c4f65 commit bcf15ad
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions tasks/jenkins.rake
Original file line number Diff line number Diff line change
@@ -1,28 +1,5 @@
require 'English'

begin
require "ci/reporter/rake/test_unit"
namespace :jenkins do
task :unit => ["jenkins:setup:test_unit", 'rake:test']

namespace :setup do
task :pre_ci do
ENV["CI_REPORTS"] = 'jenkins/reports/unit/'
gem 'ci_reporter'
end
task :minitest => [:pre_ci, "ci:setup:minitest"]
task :test_unit => [:pre_ci, "ci:setup:testunit"]
end

task :rubocop do
system("bundle exec rubocop \
--require rubocop/formatter/checkstyle_formatter \
--format progress \
--format RuboCop::Formatter::CheckstyleFormatter \
--no-color --out rubocop.xml")
exit($CHILD_STATUS.exitstatus)
end
end
rescue LoadError
# ci/reporter/rake/rspec not present, skipping this definition
require "ci/reporter/rake/test_unit"
namespace :jenkins do
desc 'Sets up CI environment for testing and run tests'
task :unit => ['ci:setup:testunit', 'rake:test']
end

0 comments on commit bcf15ad

Please sign in to comment.