Skip to content

Commit

Permalink
e2e: Only run one job at a time for a given PR
Browse files Browse the repository at this point in the history
If you push updates to a PR, currently we're leaving `e2e` jobs for
all past revisions to keep running. If you do a few quick updates,
that ends up wasting a lot of resources.

This change ensures that for a given PR, only one of these jobs runs
at a time. A previous run will get canceled and replaced with one
against the latest version of the PR.

Signed-off-by: Russell Bryant <[email protected]>
  • Loading branch information
russellb committed Jul 2, 2024
1 parent 684d142 commit f61e2db
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ on:
- 'requirements*.txt'
- '.github/workflows/e2e.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
e2e:
runs-on: ubuntu-gpu
Expand Down

0 comments on commit f61e2db

Please sign in to comment.