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

Cancel concurrent workflows #2835

Merged
merged 1 commit into from
Jun 22, 2022
Merged

Cancel concurrent workflows #2835

merged 1 commit into from
Jun 22, 2022

Conversation

akaszynski
Copy link
Member

@akaszynski akaszynski commented Jun 21, 2022

Problem

Change the GitHub actions CI/CD to cancel old workflows when a new commit that supersedes the old one. For example:

  • You open a PR.
  • Immediately determine something is broken (e.g. style guide or unit tests fail).
  • Submit a new PR.
  • Old workflows are still on-going (like docs).

While we don't pay for the actions, it does mean that new workflows have to wait if we end up saturating GitHub.

Solution

Simply set cancel-in-progress to true for concurrency. For details, see Using Concurrency.

@github-actions github-actions bot added the maintenance Low-impact maintenance activity label Jun 21, 2022
@codecov
Copy link

codecov bot commented Jun 21, 2022

Codecov Report

Merging #2835 (56769cb) into main (b699868) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2835   +/-   ##
=======================================
  Coverage   94.02%   94.02%           
=======================================
  Files          76       76           
  Lines       16405    16405           
=======================================
  Hits        15425    15425           
  Misses        980      980           

Copy link
Contributor

@MatthewFlamm MatthewFlamm left a comment

Choose a reason for hiding this comment

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

LGTM

@adeak
Copy link
Member

adeak commented Jun 21, 2022

Great idea, thanks. This has always seemed weird to me. Now we only have to watch out when we want to prove that a given test breaks before the fix is pushed :)

@tkoyama010 tkoyama010 merged commit d110462 into main Jun 22, 2022
@tkoyama010 tkoyama010 deleted the ci/cancel-in-progress branch June 22, 2022 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Low-impact maintenance activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants