Skip to content

Commit

Permalink
Add rubocop check for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ofedoren authored and adamruzicka committed Nov 29, 2024
1 parent 60072b8 commit afb5006
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/ruby_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions foreman_openscap.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit afb5006

Please sign in to comment.