From b83cb86fbb9323328fc4ea8aa645e1b30aa28ca2 Mon Sep 17 00:00:00 2001 From: Divarion_D Date: Thu, 6 Aug 2026 21:31:46 +0300 Subject: [PATCH] ci: run CI once per change (scope push to main, add concurrency) --- .github/workflows/ci.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67a450ac..e691dc30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,16 +1,24 @@ name: CI -# Quality gate: runs on every push and pull request. +# Quality gate: runs on pushes to main and on every pull request. # Tests run via the committed PHAR (tools/.bin/phpunit.phar). Class loading uses # the committed Composer PSR-4 autoloader (src/vendor/) first, with the legacy # src/autoload.php scanner as an end-of-queue fallback. The deploy path ships # vendor/ as-is and never runs `composer install`. +# `push` is scoped to main so a commit on a PR branch does NOT run the workflow +# twice (once for push, once for pull_request); PR branches are covered by the +# pull_request trigger. The concurrency group cancels superseded in-flight runs +# on rapid re-pushes / new commits to the same ref. on: push: - branches: ['**'] + branches: [main] pull_request: +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + permissions: contents: read