summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Barnowski <rossbar@berkeley.edu>2022-09-15 08:14:56 -0700
committerGitHub <noreply@github.com>2022-09-15 08:14:56 -0700
commit2ad70fd86f2c506760a4c52e2c67566d80f18e2b (patch)
tree902910d6278a782a12a3c3f4b13d55add40deda8
parent2d1f159a5fc5e3b0d7da7d96b0e9be05211eed66 (diff)
downloadnetworkx-2ad70fd86f2c506760a4c52e2c67566d80f18e2b.tar.gz
Add concurrency hook to cancel jobs on new push. (#5986)
See: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value
-rw-r--r--.github/workflows/coverage.yml4
-rw-r--r--.github/workflows/lint.yml4
-rw-r--r--.github/workflows/mypy.yml4
-rw-r--r--.github/workflows/test.yml4
4 files changed, 16 insertions, 0 deletions
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 52c8d2c4..2e3f86b6 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -6,6 +6,10 @@ on:
pull_request:
branches: [main]
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
report:
runs-on: ubuntu-22.04
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 89cbcb57..5d27750d 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -2,6 +2,10 @@ name: style
on: [push, pull_request]
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
format:
runs-on: ubuntu-latest
diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml
index 1bf20de4..b6451876 100644
--- a/.github/workflows/mypy.yml
+++ b/.github/workflows/mypy.yml
@@ -2,6 +2,10 @@ name: Mypy
on: [push, pull_request]
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
type-check:
runs-on: ubuntu-latest
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 17dab7ce..0f1d2590 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -2,6 +2,10 @@ name: test
on: [push, pull_request]
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
jobs:
base:
runs-on: ${{ matrix.os }}-latest