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

Introduce a gate/check GHA job #10315

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,17 @@ jobs:
fail_ci_if_error: true
files: ./coverage.xml
verbose: true

check: # This job does nothing and is only used for the branch protection
Copy link
Member Author

Choose a reason for hiding this comment

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

^ this would have to go into the branch protection settings

Copy link
Member

Choose a reason for hiding this comment

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

Let's give it a better name than check

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, PyCA uses all-green, some use all-successful. I originally was going to recommend gate but a colleague convinced me that check is less confusing (because it doesn't fully map to https://gating.dev and openstack's understanding of gating).
This is why I left check in the action readme example so most people would just copy-paste that. For consistency, I'd have the same job id across the board but maybe specify a differing name: value?

Copy link
Member

Choose a reason for hiding this comment

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

Different name is fine, it's just thst check is absolutely useless in terms of deriving meaning given gh naming schemes

Required-checks-agregate would be far more telling for example

Also there is possibly a need to limit who can change the dependencies

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, I'll let the maintainers bikeshed on the name, then.
As for updating branch protection in the repo settings, it's usually available for the repo admins, I think.

Copy link
Member

Choose a reason for hiding this comment

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

Ill give it a spin this evening

if: always()

needs:
- build

runs-on: ubuntu-latest

steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@198badcb65a1a44528f27d5da555c4be9f12eac6
with:
jobs: ${{ toJSON(needs) }}
Loading