From 0a004fbc7620d976f59308135674e2e0184cbc2a Mon Sep 17 00:00:00 2001 From: Hussein Ait Lahcen Date: Fri, 28 Jan 2022 13:44:33 +0100 Subject: [PATCH 1/2] kill stale jobs when pushing new changes --- .github/workflows/benchmark.yml | 3 +++ .github/workflows/check.yml | 16 ++++++++++++---- .github/workflows/simnode.yml | 4 ++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 9b55948f9b6..824fe982c93 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -14,6 +14,9 @@ jobs: - linux - x64 - bmark + concurrency: + group: bench-${{ github.ref }} + cancel-in-progress: true if: github.event.pull_request.draft == false steps: - name: Clean up diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index db2e54ce68a..b70651f488e 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -11,10 +11,6 @@ on: workflow_dispatch: -concurrency: - group: ${{ github.ref }} - cancel-in-progress: true - env: DOCKER_USER_OPTION: '$UID:$GID' @@ -26,6 +22,9 @@ jobs: - linux - x64 - sre + concurrency: + group: check-${{ github.ref }} + cancel-in-progress: true container: image: paritytech/ci-linux:production steps: @@ -50,6 +49,9 @@ jobs: - linux - x64 - sre + concurrency: + group: testcov-${{ github.ref }} + cancel-in-progress: true steps: - name: Clean up continue-on-error: true @@ -82,6 +84,9 @@ jobs: - linux - x64 - sre + concurrency: + group: tests-${{ github.ref }} + cancel-in-progress: true container: image: paritytech/ci-linux:production steps: @@ -106,6 +111,9 @@ jobs: - linux - x64 - sre + concurrency: + group: lint-${{ github.ref }} + cancel-in-progress: true container: image: paritytech/ci-linux:production steps: diff --git a/.github/workflows/simnode.yml b/.github/workflows/simnode.yml index edfe8c37144..d5134d25584 100644 --- a/.github/workflows/simnode.yml +++ b/.github/workflows/simnode.yml @@ -4,6 +4,7 @@ on: branches: - releases - main + jobs: simnode: runs-on: @@ -11,6 +12,9 @@ jobs: - linux - x64 - sre + concurrency: + group: ${{ github.ref }} + cancel-in-progress: true if: github.event.pull_request.draft == false steps: - name: Clean up From 8a6a1321d70165c33a2805a45658d26c96f25545 Mon Sep 17 00:00:00 2001 From: Hussein Ait Lahcen Date: Fri, 28 Jan 2022 14:17:19 +0100 Subject: [PATCH 2/2] test cancel --- .github/workflows/simnode.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/simnode.yml b/.github/workflows/simnode.yml index d5134d25584..efc3842d430 100644 --- a/.github/workflows/simnode.yml +++ b/.github/workflows/simnode.yml @@ -1,4 +1,5 @@ name: Run Simnode + on: pull_request: branches: