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 #1682

Merged
merged 2 commits into from
Oct 2, 2022

Conversation

webknjaz
Copy link
Member

This adds a GHA job that reliably determines if all the required dependencies have succeeded or not.

It also allows to reduce the list of required branch protection CI statuses to just one — check. This reduces the maintenance burden by a lot and have been battle-tested across a small bunch of projects in its action form and in-house implementations of other people.

It is now in use in aiohttp (and other aio-libs projects), CherryPy, some of the Ansible repositories, all of the jaraco's projects (like setuptools, importlib_metadata), some PyCQA, PyCA and pytest projects, a few AWS Labs projects. Admittedly, I maintain a few of these but it seems to address some of the pain folks have: jaraco/skeleton#55 (comment).

The story behind this is explained in more detail at https://github.com/marketplace/actions/alls-green#why.

Contributor checklist
  • Provided the tests for the changes.
  • Assure PR title is short, clear, and good to be included in the user-oriented changelog
Maintainer checklist
  • Assure one of these labels is present: backwards incompatible, feature, enhancement, deprecation, bug, dependency, docs or skip-changelog as they determine changelog listing.
  • Assign the PR to an existing or new milestone for the target version (following Semantic Versioning).

@webknjaz webknjaz added tests Testing and related things maintenance Related to maintenance processes ci Related to continuous integration tasks skip-changelog Avoid listing in changelog labels Sep 25, 2022
Copy link
Member

@atugushev atugushev left a comment

Choose a reason for hiding this comment

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

That's useful 👍🏻

@atugushev
Copy link
Member

CI is not happy due to:

ERROR: re-actors/alls-green@release/v1 is not allowed to be used in jazzband/pip-tools. Actions in this workflow must be: within a repository owned by jazzband, created by GitHub, verified in the GitHub Marketplace, or matching the following: deadsnakes/action@, pypa/gh-action-pypi-publish@, release-drafter/release-drafter@*.

@jezdez could you please approve re-actors/alls-green and update settings accordingly? Also, the check must be the only required check in CI.

@jezdez jezdez closed this Oct 1, 2022
@jezdez jezdez reopened this Oct 1, 2022
@jezdez
Copy link
Member

jezdez commented Oct 1, 2022

@atugushev I've added re-actors/alls-green to the list of approved actions, but can't add the "check" run as the only required one since it hasn't run yet. Once this PR passes and it runs, I'll add it to the settings.

@webknjaz
Copy link
Member Author

webknjaz commented Oct 1, 2022

@jezdez so did it appear in the project settings?

This adds a GHA job that reliably determines if all the required
dependencies have succeeded or not.

It also allows to reduce the list of required branch protection CI
statuses to just one — `check`. This reduces the maintenance burden
by a lot and have been battle-tested across a small bunch of projects
in its action form and in-house implementations of other people.

It is now in use in aiohttp (and other aio-libs projects), CherryPy,
some of the Ansible repositories, all of the jaraco's projects (like
`setuptools`, `importlib_metadata`), some PyCQA, PyPA, PyCA and pytest
projects, a few AWS Labs projects. Admittedly, I maintain a few of
these but it seems to address some of the pain folks have:
jaraco/skeleton#55 (comment).

The story behind this is explained in more detail at
https://github.com/marketplace/actions/alls-green#why.
@webknjaz
Copy link
Member Author

webknjaz commented Oct 1, 2022

I've applied formatting per pre-commit's requirements, amended the commit and rebased it on top of the current master. This should make all the checks green.

@jezdez
Copy link
Member

jezdez commented Oct 2, 2022

The check run appeared now in the branch protection settings, I've enabled it.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@webknjaz
Copy link
Member Author

webknjaz commented Oct 2, 2022

The check run appeared now in the branch protection settings, I've enabled it.

Note that this will block other/new PRs for as long as this one is unmerged. All of the PRs will need CI to be retriggered.

@webknjaz
Copy link
Member Author

webknjaz commented Oct 2, 2022

I've enabled the auto-merge to shorten the period of this race condition, at least for the new PRs.

@webknjaz webknjaz merged commit 4fce666 into jazzband:master Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Related to continuous integration tasks maintenance Related to maintenance processes skip-changelog Avoid listing in changelog tests Testing and related things
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants