Skip to content

Commit b567e87

Browse files
authored
chore: add & simplify concurrency setting to CI testing workflow (#780)
* Add concurrency setting to CI testing workflow * test concurrency * Add concurrency setting to docs build workflow * Simplify concurrency cancel-in-progress condition in workflows * test concurrency
1 parent dd96272 commit b567e87

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/ci-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
11-
cancel-in-progress: ${{ ! (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }}
11+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1212

1313
jobs:
1414
check-typing:

.github/workflows/ci-testing.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on: # Trigger the workflow on push or pull request, but only for the main branch
88
branches: [main]
99
types: [opened, reopened, ready_for_review, synchronize]
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
13+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
14+
1115
defaults:
1216
run:
1317
shell: bash

.github/workflows/docs-build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
branches: [main]
77
workflow_dispatch:
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
11+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
12+
913
jobs:
1014
build-docs:
1115
uses: Lightning-AI/utilities/.github/workflows/check-docs.yml@main

0 commit comments

Comments
 (0)