CI: Cancel in-progress jobs when a PR is updated (#13552)

- This should lead to faster results as jobs will be queued for shorter periods
when PRs are updated.

- Current behavior is that previously running CI jobs for an updated PR run to
completion needlessly, and cause new CI jobs to be queued.

Ref: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency
This commit is contained in:
Aditya Manthramurthy 2021-11-01 13:42:48 -07:00 committed by GitHub
parent bb639d9f29
commit 900e584514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 6 deletions

View File

@ -1,13 +1,19 @@
name: Go
name: Crosscompile
on:
pull_request:
branches:
- master
# This ensures that previous jobs for the PR are cancelled when the PR is
# updated.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build:
name: MinIO crosscompile tests on ${{ matrix.go-version }} and ${{ matrix.os }}
name: Build Tests with Go ${{ matrix.go-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:

View File

@ -1,13 +1,19 @@
name: Go
name: Linters and Tests
on:
pull_request:
branches:
- master
# This ensures that previous jobs for the PR are cancelled when the PR is
# updated.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build:
name: MinIO tests on ${{ matrix.go-version }} and ${{ matrix.os }}
name: Go ${{ matrix.go-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:

View File

@ -1,13 +1,19 @@
name: Go
name: Functional Tests
on:
pull_request:
branches:
- master
# This ensures that previous jobs for the PR are cancelled when the PR is
# updated.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build:
name: MinIO Setup on ${{ matrix.go-version }} and ${{ matrix.os }}
name: Go ${{ matrix.go-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix: