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

[ci] make GitHub Actions branch protection stricter (fixes #5501) #5645

Merged
merged 2 commits into from
Dec 28, 2022

Conversation

jameslamb
Copy link
Collaborator

Fixes #5501.

Following advice in that issue and in https://github.com/orgs/community/discussions/26733#discussioncomment-3253155, this proposes two changes to the project's GitHub Actions jobs.

  • use https://github.com/re-actors/alls-green to enforce multiple checks passing without needing to change branch protection settings every time checks are added or removed
  • give each of those "all the checks passed" jobs a unique name

This will make use of GitHub auto-merging more reliable, and reduce the risk of accidentally merging PRs where some CI jobs are failing.

Notes for Reviewers

@guolinke @shiyu1994 can you please go into the branch protection for master at https://github.com/microsoft/LightGBM/settings/branches and modify the section Require status checks to pass before merging?

The following should be checked as required:

  • all-cuda-jobs-successful (GitHub Actions)
  • all-optional-checks-successful (GitHub Actions)
  • all-python-package-jobs-successful (GitHub Actions)
  • all-r-package-jobs-successful (GitHub Actions)
  • all-static-analysis-jobs-successful (GitHub Actions)

And the following should be unchecked:

  • all-successful (GitHub Actions)

I think that only the two of you have permissions in this repo to modify that.

@guolinke
Copy link
Collaborator

I think i don't have permission to do it, ping @shiyu1994

@shiyu1994
Copy link
Collaborator

@jameslamb Done with that.

@jameslamb
Copy link
Collaborator Author

thanks @shiyu1994 ! As soon as this is approved, let's merge it.

Copy link
Collaborator

@shiyu1994 shiyu1994 left a comment

Choose a reason for hiding this comment

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

LGTM

@jameslamb jameslamb merged commit a2ae6b9 into master Dec 28, 2022
@jameslamb jameslamb deleted the ci/github-actions-checks branch December 28, 2022 02:53
@jameslamb
Copy link
Collaborator Author

Thanks so much @shiyu1994 !

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed.
To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues
including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ci] Problematic all-successful GHA job implementation
3 participants