mirror of https://github.com/scrapy/scrapy.git
Use concurrency groups to limit duplicate jobs
Leverage concurrency groups along with cancel-in-progress to favor running the most recent job. Concurrency groups are on a per workflow, per branch/tag basis. So, pushing newer updates to a branch, e.g. as part of a PR, should cancel any in progress runs of workflows that have been retriggered. See: - https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/workflow-syntax-for-github-actions#concurrency - https://docs.github.com/en/enterprise-cloud@latest/actions/learn-github-actions/contexts#github-context
This commit is contained in:
parent
0e64dec5dd
commit
884840e3a3
|
|
@ -1,6 +1,10 @@
|
|||
name: Checks
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{github.workflow}}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ on:
|
|||
tags:
|
||||
- '[0-9]+.[0-9]+.[0-9]+'
|
||||
|
||||
concurrency:
|
||||
group: ${{github.workflow}}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
name: macOS
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{github.workflow}}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: macos-11
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
name: Ubuntu
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{github.workflow}}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
name: Windows
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{github.workflow}}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: windows-latest
|
||||
|
|
|
|||
Loading…
Reference in New Issue