Skip to content

Commit

Permalink
build: cancel running CI jobs when a PR is updated
Browse files Browse the repository at this point in the history
Refs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value

PR-URL: #42017
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
targos authored and danielleadams committed Apr 24, 2022
1 parent 60d6409 commit bc3d8a7
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-tarball.yml
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-windows.yml
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/coverage-linux.yml
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/coverage-windows.yml
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/doc.yml
Expand Up @@ -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/*

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/linters.yml
Expand Up @@ -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/*
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-asan.yml
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-internet.yml
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-linux.yml
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-macos.yml
Expand Up @@ -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
Expand Down

0 comments on commit bc3d8a7

Please sign in to comment.