Skip to content

Commit 8d143fd

Browse files
authored
CI: enable auto-cancel for GitHub Actions (#41962)
1 parent 0f3e53f commit 8d143fd

File tree

5 files changed

+35
-6
lines changed

5 files changed

+35
-6
lines changed

.github/workflows/ci.yml

+15-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: CI
22

33
on:
44
push:
5-
branches: [master]
5+
branches:
6+
- master
67
pull_request:
78
branches:
89
- master
@@ -21,6 +22,10 @@ jobs:
2122
run:
2223
shell: bash -l {0}
2324

25+
concurrency:
26+
group: ${{ github.ref }}-checks
27+
cancel-in-progress: true
28+
2429
steps:
2530
- name: Checkout
2631
uses: actions/checkout@v2
@@ -94,8 +99,12 @@ jobs:
9499
web_and_docs:
95100
name: Web and docs
96101
runs-on: ubuntu-latest
97-
steps:
98102

103+
concurrency:
104+
group: ${{ github.ref }}-web-docs
105+
cancel-in-progress: true
106+
107+
steps:
99108
- name: Checkout
100109
uses: actions/checkout@v2
101110
with:
@@ -149,8 +158,11 @@ jobs:
149158
strategy:
150159
matrix:
151160
pattern: ["not slow and not network and not clipboard", "slow"]
152-
steps:
161+
concurrency:
162+
group: ${{ github.ref }}-data_manager-${{ matrix.pattern }}
163+
cancel-in-progress: true
153164

165+
steps:
154166
- name: Checkout
155167
uses: actions/checkout@v2
156168
with:

.github/workflows/database.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: Database
22

33
on:
44
push:
5-
branches: [master]
5+
branches:
6+
- master
67
pull_request:
78
branches:
89
- master
@@ -29,6 +30,10 @@ jobs:
2930
ENV_FILE: [ci/deps/actions-37-db-min.yaml, ci/deps/actions-37-db.yaml]
3031
fail-fast: false
3132

33+
concurrency:
34+
group: ${{ github.ref }}-${{ matrix.ENV_FILE }}
35+
cancel-in-progress: true
36+
3237
services:
3338
mysql:
3439
image: mysql

.github/workflows/posix.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: Posix
22

33
on:
44
push:
5-
branches: [master]
5+
branches:
6+
- master
67
pull_request:
78
branches:
89
- master
@@ -44,6 +45,9 @@ jobs:
4445
LC_ALL: ${{ matrix.settings[4] }}
4546
PANDAS_TESTING_MODE: ${{ matrix.settings[5] }}
4647
TEST_ARGS: ${{ matrix.settings[6] }}
48+
concurrency:
49+
group: ${{ github.ref }}-${{ matrix.settings[0] }}
50+
cancel-in-progress: true
4751

4852
steps:
4953
- name: Checkout

.github/workflows/pre-commit.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ name: pre-commit
33
on:
44
pull_request:
55
push:
6-
branches: [master]
6+
branches:
7+
- master
78

89
jobs:
910
pre-commit:
1011
runs-on: ubuntu-latest
12+
concurrency:
13+
group: ${{ github.ref }}-pre-commit
14+
cancel-in-progress: true
1115
steps:
1216
- uses: actions/checkout@v2
1317
- uses: actions/setup-python@v2

.github/workflows/python-dev.yml

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ jobs:
1616
name: actions-310-dev
1717
timeout-minutes: 60
1818

19+
concurrency:
20+
group: ${{ github.ref }}-dev
21+
cancel-in-progress: true
22+
1923
steps:
2024
- uses: actions/checkout@v2
2125
with:

0 commit comments

Comments
 (0)