From 35e7ff30b83fb4e415fc306c2bf3a09bb3175d5d Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 25 Nov 2026 18:18:56 +0100 Subject: [PATCH 1/2] Refine workflow triggers and concurrency Run tests only for relevant paths while preserving tag releases. Cancel superseded pull request runs without interrupting push or deployment workflows. --- .github/workflows/build_docs.yml | 2 +- .github/workflows/test_and_deploy.yml | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index a6c915f5..6e6c00ec 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -24,7 +24,7 @@ permissions: concurrency: group: pages-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: build: diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 5da576c8..acb4db15 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -6,11 +6,30 @@ on: - main tags: - "v*" + # not evaluated for tag pushes, so releases always test and deploy + paths: + - "napari_cellseg3d/**" + - "examples/**" + - "pyproject.toml" + - "tox.ini" + - "MANIFEST.in" + - ".github/workflows/test_and_deploy.yml" pull_request: branches: - main + paths: + - "napari_cellseg3d/**" + - "examples/**" + - "pyproject.toml" + - "tox.ini" + - "MANIFEST.in" + - ".github/workflows/test_and_deploy.yml" workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: test: name: ${{ matrix.platform }} py${{ matrix.python-version }} From c58e5fb98c9d849c18dcafd14e7ed54a8bec2ffc Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 25 Nov 2026 18:25:07 +0100 Subject: [PATCH 2/2] Improve guard on main --- .github/workflows/test_and_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index acb4db15..c30975b9 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -27,7 +27,7 @@ on: workflow_dispatch: concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: