Skip to content

Commit

Permalink
Cancel intermediate CI builds (#9781)
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s authored Nov 13, 2024
1 parent aebb131 commit dc450cd
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/dist_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on: # yamllint disable-line rule:truthy
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }}
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

dist_pytest:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on: # yamllint disable-line rule:truthy
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

make_html:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/latest_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on: # yamllint disable-line rule:truthy
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

latest_pytest:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on: # yamllint disable-line rule:truthy
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

mypy:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/minimal_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on: # yamllint disable-line rule:truthy
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

minimal_pytest:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on: # yamllint disable-line rule:truthy
schedule:
- cron: "0 6 * * *" # Everyday at 6:00am UTC/10:00pm PST

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

build:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/prev_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on: # yamllint disable-line rule:truthy
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

prev_pytest:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on: # yamllint disable-line rule:truthy
- master
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
# Only cancel intermediate builds if on a PR:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

pytest:
Expand Down

0 comments on commit dc450cd

Please sign in to comment.