Skip to content

Set concurrency in workflows to run one workflow at a time for one branch#169

Merged
kumaranvpl merged 3 commits into
mainfrom
concurrent-workflow
Sep 10, 2024
Merged

Set concurrency in workflows to run one workflow at a time for one branch#169
kumaranvpl merged 3 commits into
mainfrom
concurrent-workflow

Conversation

@kumaranvpl

@kumaranvpl kumaranvpl commented Sep 10, 2024

Copy link
Copy Markdown
Contributor

Description

When we push often to a branch then there are so many workflows running for same branch in parallel. This consumes more of our resources. This change runs only one workflow at a time for a branch. When new code is pushed existing running workflow is cancelled and new workflow as usual runs for newly pushed code.

Change taken from faststream - https://github.com/airtai/faststream/blob/main/.github/workflows/pr_tests.yaml#L19-L21.

Fixes #168

@codecov

codecov Bot commented Sep 10, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Merged via the queue into main with commit 5e9cc7b Sep 10, 2024
@kumaranvpl kumaranvpl deleted the concurrent-workflow branch September 10, 2024 06:48
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.

Cancel already running workflow in branch when pushing new code

2 participants