Skip to content

Commit

Permalink
Fixes #37095 - Use shared GitHub workflow to run tests (Katello#10780)
Browse files Browse the repository at this point in the history
* Fixes #37095 - Use shared GitHub workflow to run tests
* Refs #37095 - move test dependencies into an own group
Also drop some unused dependencies

(cherry picked from commit 16be014)
  • Loading branch information
evgeni authored and ekohl committed Apr 19, 2024
1 parent d7a3423 commit 6740d79
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 10 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
source 'https://rubygems.org'

gemspec

Dir[File.join(__dir__, 'gemfile.d', '*.rb')].each do |bundle|
eval_gemfile(bundle)
end
4 changes: 4 additions & 0 deletions gemfile.d/test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
group :test do
gem "vcr", "~> 6.1"
gem 'theforeman-rubocop', '~> 0.0.6', require: false
end
10 changes: 0 additions & 10 deletions katello.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6740d79

Please sign in to comment.