From a93462a719d937014708a0d35ec00d757e5b44c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Fri, 18 Feb 2022 16:46:12 +0100 Subject: [PATCH] build: cancel running CI jobs when a PR is updated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value PR-URL: https://github.com/nodejs/node/pull/42017 Reviewed-By: Mestery Reviewed-By: Tierney Cyren Reviewed-By: Antoine du Hamel Reviewed-By: Tobias Nießen Reviewed-By: Benjamin Gruenbaum Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Mary Marchini Reviewed-By: Luigi Pinca Reviewed-By: Akhil Marsonya Reviewed-By: Rich Trott --- .github/workflows/build-tarball.yml | 4 ++++ .github/workflows/build-windows.yml | 4 ++++ .github/workflows/coverage-linux.yml | 4 ++++ .github/workflows/coverage-windows.yml | 4 ++++ .github/workflows/doc.yml | 4 ++++ .github/workflows/linters.yml | 4 ++++ .github/workflows/test-asan.yml | 4 ++++ .github/workflows/test-internet.yml | 4 ++++ .github/workflows/test-linux.yml | 4 ++++ .github/workflows/test-macos.yml | 4 ++++ 10 files changed, 40 insertions(+) diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml index 9ae492a7fc1156..38a8922c093a99 100644 --- a/.github/workflows/build-tarball.yml +++ b/.github/workflows/build-tarball.yml @@ -24,6 +24,10 @@ on: - .github/** - '!.github/workflows/build-tarball.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: PYTHON_VERSION: '3.10' FLAKY_TESTS: dontcare diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 6442262f04091c..695675b5994aa2 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -19,6 +19,10 @@ on: - .github/** - '!.github/workflows/build-windows.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: PYTHON_VERSION: '3.10' FLAKY_TESTS: dontcare diff --git a/.github/workflows/coverage-linux.yml b/.github/workflows/coverage-linux.yml index 7cd43ea6672a5e..65004c243f3dd5 100644 --- a/.github/workflows/coverage-linux.yml +++ b/.github/workflows/coverage-linux.yml @@ -20,6 +20,10 @@ on: - .github/** - '!.github/workflows/coverage-linux.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: PYTHON_VERSION: '3.10' FLAKY_TESTS: dontcare diff --git a/.github/workflows/coverage-windows.yml b/.github/workflows/coverage-windows.yml index 09079d2381ec2a..234719548d0a5b 100644 --- a/.github/workflows/coverage-windows.yml +++ b/.github/workflows/coverage-windows.yml @@ -22,6 +22,10 @@ on: - .github/** - '!.github/workflows/coverage-windows.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: PYTHON_VERSION: '3.10' FLAKY_TESTS: dontcare diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 3cf114f94c067a..9bb872f35384d4 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -10,6 +10,10 @@ on: - v[0-9]+.x-staging - v[0-9]+.x +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: NODE_VERSION: lts/* diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index a351f6b2a6bdec..b8bc5ecb92efbd 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -10,6 +10,10 @@ on: - v[0-9]+.x-staging - v[0-9]+.x +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: PYTHON_VERSION: '3.10' NODE_VERSION: lts/* diff --git a/.github/workflows/test-asan.yml b/.github/workflows/test-asan.yml index 91fcb0f4e93bdc..5f2f1c93c3d521 100644 --- a/.github/workflows/test-asan.yml +++ b/.github/workflows/test-asan.yml @@ -25,6 +25,10 @@ on: - .github/** - '!.github/workflows/test-asan.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: PYTHON_VERSION: '3.10' FLAKY_TESTS: dontcare diff --git a/.github/workflows/test-internet.yml b/.github/workflows/test-internet.yml index a7a3f80ff1b007..9b504980301dbc 100644 --- a/.github/workflows/test-internet.yml +++ b/.github/workflows/test-internet.yml @@ -17,6 +17,10 @@ on: - v[0-9]+.x paths: [test/internet/**] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: PYTHON_VERSION: '3.10' FLAKY_TESTS: dontcare diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 3119df3c8af099..22b5e9a35d3dd9 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -19,6 +19,10 @@ on: - .github/** - '!.github/workflows/test-linux.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: PYTHON_VERSION: '3.10' FLAKY_TESTS: dontcare diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index 5d83e786d384ab..40885bd9e65c5a 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -25,6 +25,10 @@ on: - .github/** - '!.github/workflows/test-macos.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: PYTHON_VERSION: '3.10' FLAKY_TESTS: dontcare