Hi folks,

Reminder that projects in the https://github.com/pypa org share a limit of 20 concurrent jobs. Workflows in your project with long-running jobs or a large number of jobs will slow down the build queue for other projects in the org.

A few changes you can make to your workflows to consume less resources without changing your jobs themselves:

Only run CI workflows on PRs and pushes to the default branch
Without this, workflows will be triggered for pushes to branches that do not have corresponding PRs, and pushes to branches that do have corresponding PRs will run each workflow twice.

An example to add to your workflow:

      - main

Consider running expensive workflows on tags only
Some expensive workflows might not need to run on PRs or every push to your default branch, and can be restricted to run on tags only.

An example to add to your workflow:

      - '*'

Use concurrency groups and cancel-in-progress:
Concurrency groups are a way to mark related jobs as being in the same group. By grouping jobs based on pull request # or SHA, and combining this with the cancel-in-progress setting, new commits added to the same concurrency group will cancel in-progress jobs on previous commits.

An example to add to your workflow (taken from pypa/pip/.github/workflows/ci.yml):

  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: true

(Note that GitHub's example of ${{ github.workflow }}-${{ github.ref }} will have the effect of cancelling in-progress jobs on the default branch, which is generally not desirable)