Skip to content

Commit

Permalink
CI: Set up concurrency groups for CI
Browse files Browse the repository at this point in the history
This should set things up to automatically cancel a run once a new one
is pushed to a PR.
  • Loading branch information
dopplershift committed Nov 25, 2021
1 parent 664ecfe commit f6f872c
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: "Code Analysis"

concurrency:
group: ${{ github.workflow}}-${{ github.head_ref }}
cancel-in-progress: true

on:
push:
branches: [main]
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow}}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
#
# Build our docs on macOS and Windows on Python 3.8 and 3.7, respectively.
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
permissions:
contents: write

concurrency:
group: ${{ github.workflow}}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
#
# Build our docs on Linux against multiple Pythons
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
branches: [main]
pull_request:

concurrency:
group: ${{ github.workflow}}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
flake8:
name: Flake8
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/tests-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow}}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
#
# Run all tests on Conda on both Windows and macOS
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/tests-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow}}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
#
# Run all tests on Linux using standard PyPI packages, including minimum requirements
Expand Down

0 comments on commit f6f872c

Please sign in to comment.