From ebeefcd534db4324498fdb18046ebc6255ddcdf2 Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Sat, 5 Sep 2026 12:57:58 +0900 Subject: [PATCH] fix(actions): isolate MV3 PR runs --- .github/workflows/mv3-compatibility.yml | 6 ++++-- tests/test_mv3_compatibility_contract.py | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mv3-compatibility.yml b/.github/workflows/mv3-compatibility.yml index f6b227c3a..d80210878 100644 --- a/.github/workflows/mv3-compatibility.yml +++ b/.github/workflows/mv3-compatibility.yml @@ -3,6 +3,7 @@ name: Manifest V3 Compatibility on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - ".github/workflows/mv3-compatibility.yml" - "crates/originweave-core/**" @@ -22,11 +23,12 @@ permissions: contents: read concurrency: - group: mv3-compatibility-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.repository }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: chrome-for-testing: + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} name: Pinned Chrome for Testing MV3 fixture runs-on: ubuntu-24.04 timeout-minutes: 20 diff --git a/tests/test_mv3_compatibility_contract.py b/tests/test_mv3_compatibility_contract.py index 10872ddac..a93a03495 100644 --- a/tests/test_mv3_compatibility_contract.py +++ b/tests/test_mv3_compatibility_contract.py @@ -178,6 +178,20 @@ def test_workflow_runs_the_real_browser_lane_without_model_credentials(self) -> self.assertNotIn("NVIDIA_NIM_API_KEY", workflow) self.assertNotIn("COPILOT_GITHUB_TOKEN", workflow) self.assertNotIn("contents: write", workflow) + self.assertIn( + "types: [opened, synchronize, reopened, ready_for_review]", + workflow, + ) + self.assertIn("${{ github.workflow }}-${{ github.repository }}", workflow) + self.assertIn( + "${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }}", + workflow, + ) + self.assertIn( + "cancel-in-progress: ${{ github.event_name == 'pull_request' }}", + workflow, + ) + self.assertIn("github.event.pull_request.draft == false", workflow) def test_doctoring_records_primary_chromium_evidence(self) -> None: """The exact browser baseline and non-compatibility claims must be documented."""