Skip to content

Commit af9b6ac

Browse files
authored
ci: add concurrency settings to lint.yml and test.yml workflows (#193)
This pull request includes changes to the GitHub Actions workflows to add concurrency control for the `lint` and `test` jobs. The most important changes are: GitHub Actions concurrency control: * [`.github/workflows/lint.yml`](diffhunk://#diff-107e910e9f2ebfb9a741fa10b2aa7100cc1fc4f5f3aca2dfe78b905cbd73c0d2R10-R13): Added concurrency control to the `lint` job to group by workflow and ref, and cancel in-progress runs for non-main branches. * [`.github/workflows/test.yml`](diffhunk://#diff-faff1af3d8ff408964a57b2e475f69a6b7c7b71c9978cccc8f471798caac2c88R10-R13): Added concurrency control to the `test` job to group by workflow and ref, and cancel in-progress runs for non-main branches.
1 parent fff7d0b commit af9b6ac

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/lint.yml

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

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: ${{ !contains(github.ref, 'main') }}
13+
1014
jobs:
1115
lint:
1216
runs-on: ubuntu-latest

.github/workflows/test.yml

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

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: ${{ !contains(github.ref, 'main') }}
13+
1014
jobs:
1115
test:
1216
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)