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: nodejs#42017
Reviewed-By: Mestery <[email protected]>
Reviewed-By: Tierney Cyren <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Mary Marchini <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
targos authored and bengl committed Feb 21, 2022
1 parent 0301896 commit 2f62a1c
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 2f62a1c

Please sign in to comment.