From bc3d8a752f43060287d8b943b7322ca724e7591f 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 a6e9111bc092cd..2312d10d33faee 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 b19a744bab31ec..550b4424e50407 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