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.

@ekohl ekohl reopened this Oct 31, 2023
@ekohl ekohl force-pushed the reusable-workflows branch from 41afbf4 to f4be66a Compare October 31, 2023 17:03
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 ekohl force-pushed the reusable-workflows branch from f4be66a to 61bb4c6 Compare January 10, 2024 11:12
@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 force-pushed the reusable-workflows branch from 61bb4c6 to ad9e31b Compare January 10, 2024 14:15
@ekohl ekohl marked this pull request as ready for review January 10, 2024 14:27
@ekohl ekohl mentioned this pull request Jan 10, 2024
ekohl added 2 commits January 24, 2024 11:58
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.
@ekohl ekohl force-pushed the reusable-workflows branch from ad9e31b to 872a733 Compare January 24, 2024 10:59
@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