diff --git a/.github/workflows/ruby_tests.yml b/.github/workflows/ruby_tests.yml index 72d92275..601ff441 100644 --- a/.github/workflows/ruby_tests.yml +++ b/.github/workflows/ruby_tests.yml @@ -9,8 +9,13 @@ on: pull_request: jobs: + rubocop: + name: Rubocop + uses: theforeman/actions/.github/workflows/rubocop.yml@v0 + test: name: Ruby + needs: rubocop uses: theforeman/actions/.github/workflows/foreman_plugin.yml@v0 with: plugin: foreman_openscap diff --git a/Gemfile b/Gemfile index da59d035..d08008da 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source "http://rubygems.org" -gem 'theforeman-rubocop', '~> 0.1.0.pre', groups: %i[development rubocop] +gem 'theforeman-rubocop', '~> 0.1.1', groups: %i[development rubocop] gemspec diff --git a/Rakefile b/Rakefile index 6006cf3f..ba84d04f 100755 --- a/Rakefile +++ b/Rakefile @@ -34,3 +34,10 @@ Rake::TestTask.new(:test) do |t| end task :default => :test + +begin + require 'rubocop/rake_task' + RuboCop::RakeTask.new +rescue => _ + puts 'Rubocop not loaded.' +end diff --git a/foreman_openscap.gemspec b/foreman_openscap.gemspec index 3f8a90c7..314da130 100644 --- a/foreman_openscap.gemspec +++ b/foreman_openscap.gemspec @@ -14,4 +14,5 @@ Gem::Specification.new do |s| s.test_files = Dir["test/**/*"] s.add_development_dependency "rake" + s.add_development_dependency "rdoc" end