-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #37095 - Use shared GitHub workflow to run tests #10780
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 | ||
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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is a shame dependabot doesn't understand this, where it did understand the previous format. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in this very particular case, we could just write |
||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
group :test do | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why move these into this group in a Gemfile rather than keep them where they are? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Today, they are defined as development dependencies, but we do not install the "development" group in CI as that would be silly (we don't need pry and friends from https://github.com/theforeman/foreman/blob/develop/bundler.d/development.rb). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. More in my old comment at #10780 (review) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree and disagree. These testing frameworks are, I would argue, part of development. We shouldn't divorce testing from development. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But are we divorcing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically development dependencies in a gemspe end up in a bundler group called development. This just further split it. It should be noted you can no longer load them via gemspec in a bundler file. Perhaps that's something that will show up in gems that depend on katello and want to use its tests There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've opened theforeman/jenkins-jobs#410 to at least fix Jenkins support for this setup. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ehelms do the recent change to move all devel-like deps to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I sense snark in the force. And yes it does. Thank you. |
||
gem "vcr", "~> 6.1" | ||
gem 'theforeman-rubocop', '~> 0.0.6', require: false | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing to consider for branching. When Katello gets branched, you'll have to add a
foreman_version: X.Y-stable
here, as this is what's driving which Foreman branch is used for testing, and you want them to match ;-)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can that be handled somehow centrally through some mapping or matrix file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no such thing today (which of course doesn't mean we can't invent it…)
Today, this mapping lives in https://github.com/theforeman/jenkins-jobs/blob/master/theforeman.org/pipelines/test/testKatello.groovy#L1 and needs to be edited by whoever does the branching. So it's not a workflow change as such.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wbclark @qcjames53 assuming this merges as-is, we'll need a new branching step to update the
foreman_version
in thisruby.yml
file.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think to make it more explicit, we could go and set
foreman_version: develop
today, so it can becomes/develop/3.9-stable/
instead of adding a new line?