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 a matrix for test-repos not jobs #579

Merged
merged 2 commits into from
Feb 9, 2022

Conversation

agrare
Copy link
Member

@agrare agrare commented Feb 8, 2022

There is a limit of 20 on the number of times other workflows can be referenced in a workflow, so rather than 1 job per repo use a matrix for test-repo

"uses" => "ManageIQ/manageiq-cross_repo/.github/workflows/manageiq_cross_repo.yaml@master",
"with" => {
"test-repo" => test_repo,
"test-repo" => "[#{test_repos.map { |repo| "\"#{repo}\"" }.join(", ")}]",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"test-repo" => "[#{test_repos.map { |repo| "\"#{repo}\"" }.join(", ")}]",
"test-repo" => test_repos.inspect,

Ruby array syntax is JSON compliant, so this is a lot simpler.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah thanks much better, felt like there had to be a better way to do that 😆

@agrare agrare force-pushed the update_github_actions_matrix branch from d8f26d7 to 598ff45 Compare February 9, 2022 00:22
lib/github_service/commands/cross_repo_test.rb Outdated Show resolved Hide resolved
@miq-bot
Copy link
Member

miq-bot commented Feb 9, 2022

Checked commits agrare/miq_bot@598ff45~...341e80d with ruby 2.6.3, rubocop 1.13.0, haml-lint 0.35.0, and yamllint
2 files checked, 0 offenses detected
Everything looks fine. ⭐

"test-repo" => test_repo,
"repos" => repos.join(",")
"test-repos" => test_repos.inspect,
"repos" => repos.join(",")
Copy link
Member

Choose a reason for hiding this comment

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

Not for this PR, but it might be nice to do this one as repos.inspect for consistency with test-repos. I know that it's not used in the same way, but it's weird to have one be an "Array" and the other not.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah it is because this one is passed as an env var where the other is split into individual repos but don't disagree

@Fryguy Fryguy merged commit 5f60fd4 into ManageIQ:master Feb 9, 2022
@agrare agrare deleted the update_github_actions_matrix branch February 9, 2022 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants