ets icon indicating copy to clipboard operation
ets copied to clipboard

Use GitHub Actions concurrency

Open rahulporuri opened this issue 3 years ago • 1 comments

At the moment, pushing commits to a PR where GitHub Actions CI is alreaady running does not cancel the running job. Instead, the job continues running and a new job is scheduled. This is unnecessarily wasteful and adds delays to the time CI takes on our PRs.

It looks like GitHub Actions concurrency is the answer to this problem. We need to include the following in our jobs -

concurrency: 
  # These lines should have the effect of cancelling CI runs for
  # existing commits when a new commit is pushed to the PR.
  group: ${{ github.head_ref }}
  cancel-in-progress: true
  • https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency
  • https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-using-concurrency-to-cancel-any-in-progress-job-or-run

rahulporuri avatar Jul 19 '21 15:07 rahulporuri

Note that we should probably take this opportunity to also set the PYTHONUNBUFFERED environment variable in all github actions configuration files.

rahulporuri avatar Jul 20 '21 04:07 rahulporuri