From f13dba9765fa2d17fcc7510069472f772c000f6d Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Sat, 9 Mar 2024 08:37:47 +1300 Subject: [PATCH] ci: cancel in-progress jobs when new changes are pushed (#432) --- .github/workflows/dummy.yml | 5 +++++ .github/workflows/generator.yml | 5 +++++ .github/workflows/jest.yml | 5 +++++ .github/workflows/js-lint.yml | 5 +++++ .github/workflows/rubocop.yml | 5 +++++ .github/workflows/ruby.yml | 5 +++++ 6 files changed, 30 insertions(+) diff --git a/.github/workflows/dummy.yml b/.github/workflows/dummy.yml index 69d04780..e2027732 100644 --- a/.github/workflows/dummy.yml +++ b/.github/workflows/dummy.yml @@ -7,6 +7,11 @@ on: - 'next' pull_request: +concurrency: + # Pushing new changes to a branch will cancel any in-progress CI runs + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: runs-on: ubuntu-latest diff --git a/.github/workflows/generator.yml b/.github/workflows/generator.yml index 655f2326..02319dc5 100644 --- a/.github/workflows/generator.yml +++ b/.github/workflows/generator.yml @@ -7,6 +7,11 @@ on: - 'next' pull_request: +concurrency: + # Pushing new changes to a branch will cancel any in-progress CI runs + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: name: Generator specs diff --git a/.github/workflows/jest.yml b/.github/workflows/jest.yml index 26d47b95..22667a56 100644 --- a/.github/workflows/jest.yml +++ b/.github/workflows/jest.yml @@ -7,6 +7,11 @@ on: - 'next' pull_request: +concurrency: + # Pushing new changes to a branch will cancel any in-progress CI runs + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: jest: name: Jest specs diff --git a/.github/workflows/js-lint.yml b/.github/workflows/js-lint.yml index 905d019f..d197b8ba 100644 --- a/.github/workflows/js-lint.yml +++ b/.github/workflows/js-lint.yml @@ -7,6 +7,11 @@ on: - 'next' pull_request: +concurrency: + # Pushing new changes to a branch will cancel any in-progress CI runs + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lint: name: JS Lint diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 73016513..419ce2bc 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -7,6 +7,11 @@ on: - 'next' pull_request: +concurrency: + # Pushing new changes to a branch will cancel any in-progress CI runs + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: rubocop: name: Rubocop diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index e10720b6..b50dbf90 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -7,6 +7,11 @@ on: - 'next' pull_request: +concurrency: + # Pushing new changes to a branch will cancel any in-progress CI runs + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: name: Ruby specs