From a333c5a3f0f12ee607cac16f0a34bcc7d600861f Mon Sep 17 00:00:00 2001 From: HarshCasper Date: Wed, 23 Feb 2022 11:36:17 +0530 Subject: [PATCH] CI: Improve concurrency to cancel running jobs on PR update --- .github/workflows/build_test.yml | 4 ++++ .github/workflows/cygwin.yml | 5 +++++ .github/workflows/wheels.yml | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 53983c40756d..3a9096ed6a63 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -18,6 +18,10 @@ env: DOWNLOAD_OPENBLAS: 1 PYTHON_VERSION: 3.8 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: lint: if: "github.repository == 'numpy/numpy' && github.ref != 'refs/heads/main' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 8bf7bd1a6923..98c3c534a83f 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -9,6 +9,11 @@ on: pull_request: branches: - main + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: cygwin_build_test: runs-on: windows-latest diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 9390b8081bf6..dda06fca12ac 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -21,6 +21,10 @@ on: pull_request: workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: get_commit_message: name: Get commit message