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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cancel old in-progress CI workflows #13811

Merged
merged 1 commit into from Mar 2, 2022

Conversation

littledivy
Copy link
Member

CI will run only on the latest commit in a PR. Saves energy 馃尣

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency

Idea from nodejs/node#42017

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM. Nice!

Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

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

Can we not do this on main? On main we want CI for every commit so we get all the canary releases.

@kt3k
Copy link
Member

kt3k commented Mar 2, 2022

@lucacasonato
github doc says github.head_ref is only defined on pull_request events. So the expression ${{ github.head_ref || github.run_id }} should fallback to github.run_id (unique for each run) at push event, and won't prevent the main build (to my understanding)

@littledivy
Copy link
Member Author

Yup, This won't affect main since concurrency group github.run_id is always unique

@lucacasonato
Copy link
Member

One note: this does make committing multiple commits to find flaky tests more difficult.

@bartlomieju
Copy link
Member

One note: this does make committing multiple commits to find flaky tests more difficult.

Yeah basically in such case we'll need to push empty commit after the previous one finished. Let's see how it works, but I'm skeptical

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants