Skip to content
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

Use reusable GitHub Actions for testing #519

Merged
merged 2 commits into from
Jan 28, 2024

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Mar 14, 2022

This reduces the duplication between projects. For example, this ensures testing on Ruby 2.7 which previously didn't happen.

There are various preparation PRs, see the commits for details.

Right now this is incomplete because it loses the caching step that happens on a push to master. It also still uses the repository in my own namespace. This is just to see if it works.

@nofaralfasi
Copy link
Contributor

Upon reviewing the PR, it seems that it has been open for quite some time without recent activity. In order to keep our repository organized and up-to-date, we've decided to close this draft PR for now.
Feel free to reopen it if you decide to continue this work.

Copy link
Member Author

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still a TODO, but this needs to happen. The current action is using wrong versions for NodeJS today. It will get worse once we add Ruby 3 to the test matrix.

.github/workflows/ruby_tests.yml Show resolved Hide resolved
.github/workflows/ruby_tests.yml Show resolved Hide resolved
@ekohl
Copy link
Member Author

ekohl commented Jan 10, 2024

Rebased. I've split off #679 & #680 to separate PRs so they can be merged already.

t.libs << ['test', test_dir]
t.pattern = "#{test_dir}/**/*_test.rb"
t.test_files = [Rails.root.join('test/unit/foreman/access_permissions_test.rb')]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a related discussion in theforeman/actions#16 on the best way to do this.

@ekohl ekohl marked this pull request as ready for review January 10, 2024 14:27
@ekohl ekohl mentioned this pull request Jan 10, 2024
This moves the specific override to the test defined in rake. This means
running test:foreman_ansible runs all required tests from core as well.
The only downside it that running rake test will run the particular test
twice.
This reduces the duplication between projects. For example, this ensures
testing on Ruby 2.7 and NodeJS 14 which previously didn't happen.
@nofaralfasi
Copy link
Contributor

Can we merge this PR?

@nofaralfasi nofaralfasi merged commit 233ec03 into theforeman:master Jan 28, 2024
8 of 9 checks passed
@ekohl ekohl deleted the reusable-workflows branch January 28, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants