Skip to content

Commit 57c7794

Browse files
author
Teodor Ciuraru
committed
feat(ci): add concurrency control to all BrowserStack workflows
Add concurrency control to cancel old workflow runs when new commits are pushed: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true This prevents: - Wasting BrowserStack minutes on outdated commits - Queue saturation from rapid consecutive pushes - Running multiple builds of same workflow simultaneously Different workflows still run in parallel (e.g., Swift + Android both run). Only cancels older runs of SAME workflow on SAME branch/PR.
1 parent ab557a1 commit 57c7794

11 files changed

Lines changed: 46 additions & 2 deletions

.github/workflows/android-cpp-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
- ".github/workflows/android-cpp-ci.yml"
1313
workflow_dispatch:
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
1519
jobs:
1620
lint:
1721
name: Lint (ubuntu-latest)

.github/workflows/android-java-ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
pull_request:
55
workflow_dispatch:
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
lint:
913
name: Lint (ubuntu-latest)
@@ -327,4 +331,4 @@ jobs:
327331
echo "- Samsung Galaxy S23 (Android 13)" >> $GITHUB_STEP_SUMMARY
328332
echo "- Google Pixel 6 (Android 12)" >> $GITHUB_STEP_SUMMARY
329333
echo "- OnePlus 9 (Android 11)" >> $GITHUB_STEP_SUMMARY
330-
fi
334+
fi

.github/workflows/android-kotlin-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- ".github/workflows/android-kotlin-ci.yml"
88
workflow_dispatch:
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
lint:
1216
name: Lint (ubuntu-latest)

.github/workflows/dotnet-maui-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- ".github/workflows/dotnet-maui-ci.yml"
88
workflow_dispatch:
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
lint:
1216
name: Lint

.github/workflows/flutter-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- ".github/workflows/flutter-ci.yml"
88
workflow_dispatch:
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
lint:
1216
name: Lint

.github/workflows/java-spring-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
pull_request:
1010
workflow_dispatch:
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216

1317
jobs:
1418
lint:

.github/workflows/javascript-web-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- ".github/workflows/javascript-web-ci.yml"
88
workflow_dispatch:
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
lint:
1216
name: Lint

.github/workflows/kotlin-multiplatform-ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
pull_request:
55
workflow_dispatch:
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711

812
jobs:
913
lint:
@@ -523,4 +527,4 @@ jobs:
523527
echo "### BrowserStack Session" >> $GITHUB_STEP_SUMMARY
524528
echo "" >> $GITHUB_STEP_SUMMARY
525529
echo "🤖 [View Android Test Results](https://app-automate.browserstack.com/builds?project=QuickStart+Kotlin+Multiplatform&build=CI+Build+%23${{ github.run_number }})" >> $GITHUB_STEP_SUMMARY
526-
fi
530+
fi

.github/workflows/react-native-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- ".github/workflows/react-native-ci.yml"
88
workflow_dispatch:
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
lint:
1216
name: Lint

.github/workflows/react-native-expo-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- ".github/workflows/react-native-expo-ci.yml"
88
workflow_dispatch:
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
lint:
1216
name: Lint

0 commit comments

Comments
 (0)