diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml new file mode 100644 index 00000000000..c93e2b3fda1 --- /dev/null +++ b/.github/workflows/ruby.yml @@ -0,0 +1,27 @@ +--- +name: CI + +on: + pull_request: + push: + branches: + - 'master' + - 'KATELLO-*' + +concurrency: + group: ${{ github.ref_name }}-${{ github.workflow }} + cancel-in-progress: true + +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: katello + postgresql_container: ghcr.io/theforeman/postgresql-evr + test_existing_database: false diff --git a/Gemfile b/Gemfile index fa75df15632..fbd79bba867 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,7 @@ source 'https://rubygems.org' gemspec + +Dir[File.join(__dir__, 'gemfile.d', '*.rb')].each do |bundle| + eval_gemfile(bundle) +end diff --git a/gemfile.d/test.rb b/gemfile.d/test.rb new file mode 100644 index 00000000000..a4e052f4d5e --- /dev/null +++ b/gemfile.d/test.rb @@ -0,0 +1,4 @@ +group :test do + gem "vcr", "~> 6.1" + gem 'theforeman-rubocop', '~> 0.0.6', require: false +end diff --git a/katello.gemspec b/katello.gemspec index 95ae1c776aa..5b23fc1f33f 100644 --- a/katello.gemspec +++ b/katello.gemspec @@ -64,14 +64,4 @@ Gem::Specification.new do |gem| # UI gem.add_dependency "deface", '>= 1.0.2', '< 2.0.0' gem.add_dependency "angular-rails-templates", "~> 1.1.0" - - # Testing - gem.add_development_dependency "factory_bot_rails", "~> 4.5" - gem.add_development_dependency "mocha" - gem.add_development_dependency "vcr", "~> 6.1" - gem.add_development_dependency "webmock" - gem.add_development_dependency "robottelo_reporter" - - # Rubocop - gem.add_development_dependency 'theforeman-rubocop', '~> 0.0.6' end