From 09daa42545301dabf692362bef1b00c67609b717 Mon Sep 17 00:00:00 2001 From: Shutong Wu <51266340+Scriptwonder@users.noreply.github.com> Date: Fri, 22 May 2026 23:30:01 +0800 Subject: [PATCH] ci: stop firing unity-tests/python-tests twice for beta and main pushes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A push to beta (or main) that touches MCPForUnity/** or Server/** triggers the test workflow via two paths: push to beta ─┬─► unity-tests.yml (direct push trigger, branches: ["**"]) │ └─► beta-release.yml ──workflow_call──► unity-tests.yml Both invocations land in GitHub's auto-generated concurrency group `unity-tests-refs/heads/beta`, so the later one cancels the earlier with the noisy "Canceling since a higher priority waiting request for unity-tests-refs/heads/beta exists" annotation. The cancelled run shows red on the Actions page even though the workflow_call sibling completed fine. Switch the direct push trigger to `branches-ignore: [beta, main]` on both unity-tests.yml and python-tests.yml. Coverage on those branches is still delivered through workflow_call from beta-release.yml / release.yml; we just stop firing a duplicate run that gets killed by concurrency. PR checks, feature-branch pushes, and manual workflow_dispatch invocations are unaffected. --- .github/workflows/python-tests.yml | 6 +++++- .github/workflows/unity-tests.yml | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 134728bec..cc78c7649 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -2,7 +2,11 @@ name: Python Tests on: push: - branches: ["**"] + # Exclude beta and main: those branches re-trigger this workflow via + # workflow_call from beta-release.yml / release.yml. Without the exclusion, + # a push to beta that touches Server/** fires this workflow twice for the + # same SHA, and GitHub auto-cancels the duplicate. + branches-ignore: [beta, main] paths: - Server/** - .github/workflows/python-tests.yml diff --git a/.github/workflows/unity-tests.yml b/.github/workflows/unity-tests.yml index 72e3ddd54..05b337280 100644 --- a/.github/workflows/unity-tests.yml +++ b/.github/workflows/unity-tests.yml @@ -10,7 +10,13 @@ on: required: false default: "" push: - branches: ["**"] + # Exclude beta and main: those branches re-trigger this workflow via + # workflow_call from beta-release.yml / release.yml. Without the exclusion, + # a push to beta that touches MCPForUnity/** fires this workflow twice + # for the same SHA, and GitHub's auto-generated concurrency group + # (`unity-tests-refs/heads/beta`) cancels the older run with the noisy + # "higher priority waiting request" annotation. + branches-ignore: [beta, main] paths: - TestProjects/UnityMCPTests/** - MCPForUnity/Editor/**