From 4d26983df3d7cf8968cdd6ddd7cc4d04a60d5c18 Mon Sep 17 00:00:00 2001 From: lucarlig Date: Fri, 1 May 2026 12:51:30 +0100 Subject: [PATCH] Fix mutation diff source mismatch Signed-off-by: lucarlig --- .github/workflows/ci-rust-python-package.yaml | 3 +-- tests/test_plugin_catalog.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-rust-python-package.yaml b/.github/workflows/ci-rust-python-package.yaml index a4f9090..7d57720 100644 --- a/.github/workflows/ci-rust-python-package.yaml +++ b/.github/workflows/ci-rust-python-package.yaml @@ -232,8 +232,7 @@ jobs: - name: Create mutation diff env: BASE_SHA: ${{ github.event.pull_request.base.sha }} - HEAD_SHA: ${{ github.event.pull_request.head.sha }} - run: git diff "${BASE_SHA}..${HEAD_SHA}" -- '*.rs' > cargo-mutants.diff + run: git diff "${BASE_SHA}" -- '*.rs' > cargo-mutants.diff - name: Run cargo-mutants with nextest env: diff --git a/tests/test_plugin_catalog.py b/tests/test_plugin_catalog.py index 8070af5..9b1a56d 100644 --- a/tests/test_plugin_catalog.py +++ b/tests/test_plugin_catalog.py @@ -2652,9 +2652,9 @@ def test_ci_workflow_includes_parity_jobs_for_rust_plugin_checks(self) -> None: self.assertIn("cargo install cargo-mutants --version 27.0.0 --locked", mutants_install_run) self.assertIn("cargo mutants --version", mutants_install_run) self.assertIn("fetch-depth: 0", mutants_section) - self.assertEqual('git diff "${BASE_SHA}..${HEAD_SHA}" -- \'*.rs\' > cargo-mutants.diff\n', mutants_diff_run) + self.assertEqual('git diff "${BASE_SHA}" -- \'*.rs\' > cargo-mutants.diff\n', mutants_diff_run) self.assertIn("BASE_SHA: ${{ github.event.pull_request.base.sha }}", mutants_section) - self.assertIn("HEAD_SHA: ${{ github.event.pull_request.head.sha }}", mutants_section) + self.assertNotIn("HEAD_SHA:", mutants_section) self.assertIn("mutation_job: ${{ fromJson(needs.validate-and-detect.outputs.mutation_jobs) }}", mutants_section) self.assertIn("CARGO_PACKAGE: ${{ matrix.mutation_job.cargo_package }}", mutants_section) self.assertIn("IN_DIFF: ${{ matrix.mutation_job.in_diff }}", mutants_section)