From 7f53a86eafef05b925bfac13c0ba70ce56e993a2 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Sat, 22 Oct 2022 22:53:55 +0800 Subject: [PATCH] Cancel running CI jobs when a PR is updated --- .github/workflows/test-autoreview.yml | 4 ++++ .github/workflows/test-coding-standards.yml | 4 ++++ .github/workflows/test-deptrac.yml | 4 ++++ .github/workflows/test-phpcpd.yml | 4 ++++ .github/workflows/test-phpstan.yml | 4 ++++ .github/workflows/test-phpunit.yml | 4 ++++ .github/workflows/test-rector.yml | 4 ++++ .github/workflows/test-scss.yml | 4 ++++ .github/workflows/test-userguide.yml | 4 ++++ 9 files changed, 36 insertions(+) diff --git a/.github/workflows/test-autoreview.yml b/.github/workflows/test-autoreview.yml index 4345195cb187..d1226e821f3c 100644 --- a/.github/workflows/test-autoreview.yml +++ b/.github/workflows/test-autoreview.yml @@ -14,6 +14,10 @@ on: - '**.php' - .github/workflows/test-autoreview.yml +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: auto-review-tests: name: Automatic Code Review diff --git a/.github/workflows/test-coding-standards.yml b/.github/workflows/test-coding-standards.yml index f13e471c355f..580259b15f18 100644 --- a/.github/workflows/test-coding-standards.yml +++ b/.github/workflows/test-coding-standards.yml @@ -12,6 +12,10 @@ on: - 'spark' - '.github/workflows/test-coding-standards.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: lint: name: PHP ${{ matrix.php-version }} Lint with PHP CS Fixer diff --git a/.github/workflows/test-deptrac.yml b/.github/workflows/test-deptrac.yml index 92c62996b072..a96a43b4b0e2 100644 --- a/.github/workflows/test-deptrac.yml +++ b/.github/workflows/test-deptrac.yml @@ -24,6 +24,10 @@ on: - 'depfile.yaml' - '.github/workflows/test-deptrac.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: build: name: Architectural Inspection diff --git a/.github/workflows/test-phpcpd.yml b/.github/workflows/test-phpcpd.yml index 967e49d9ad46..b9d056b3fe45 100644 --- a/.github/workflows/test-phpcpd.yml +++ b/.github/workflows/test-phpcpd.yml @@ -23,6 +23,10 @@ on: - 'system/**.php' - '.github/workflows/test-phpcpd.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: build: name: Duplicate Code Detection diff --git a/.github/workflows/test-phpstan.yml b/.github/workflows/test-phpstan.yml index aaff1fce3dff..d778ddfc5e5b 100644 --- a/.github/workflows/test-phpstan.yml +++ b/.github/workflows/test-phpstan.yml @@ -27,6 +27,10 @@ on: - '**.neon.dist' - '.github/workflows/test-phpstan.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: build: name: PHP ${{ matrix.php-versions }} Static Analysis diff --git a/.github/workflows/test-phpunit.yml b/.github/workflows/test-phpunit.yml index 0c58701ac1bf..99820f47671b 100644 --- a/.github/workflows/test-phpunit.yml +++ b/.github/workflows/test-phpunit.yml @@ -27,6 +27,10 @@ on: - phpunit.xml.dist - .github/workflows/test-phpunit.yml +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: tests: name: PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }} diff --git a/.github/workflows/test-rector.yml b/.github/workflows/test-rector.yml index 19a458e95b45..46a7a1ad6ec1 100644 --- a/.github/workflows/test-rector.yml +++ b/.github/workflows/test-rector.yml @@ -29,6 +29,10 @@ on: - composer.json - rector.php +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: build: name: PHP ${{ matrix.php-versions }} Analyze code (Rector) on ${{ matrix.paths }} diff --git a/.github/workflows/test-scss.yml b/.github/workflows/test-scss.yml index 3517a4f26500..9f3859ef16be 100644 --- a/.github/workflows/test-scss.yml +++ b/.github/workflows/test-scss.yml @@ -19,6 +19,10 @@ on: - '**.css' - '.github/workflows/test-scss.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: build: name: Compilation of SCSS (Dart Sass) diff --git a/.github/workflows/test-userguide.yml b/.github/workflows/test-userguide.yml index e996fcbfefe4..6248be72496b 100644 --- a/.github/workflows/test-userguide.yml +++ b/.github/workflows/test-userguide.yml @@ -10,6 +10,10 @@ on: - 'user_guide_src/**' - '.github/workflows/test-userguide.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: syntax_check: name: Check User Guide syntax