Skip to content

ci: skip mutation tests on PRs with no TS source changes#622

Merged
rajbos merged 1 commit intomainfrom
rajbos/filter-mutation-tests-code-changes
Apr 18, 2026
Merged

ci: skip mutation tests on PRs with no TS source changes#622
rajbos merged 1 commit intomainfrom
rajbos/filter-mutation-tests-code-changes

Conversation

@rajbos
Copy link
Copy Markdown
Owner

@rajbos rajbos commented Apr 18, 2026

Summary

Mutation tests are expensive (~60 min). This PR avoids running them on PRs that don't touch any TypeScript source code in the VS Code extension.

Changes

Added a check-code-changes job that:

  • Diffs the PR branch against the base branch
  • Sets vscode_src_changed=true only when .ts files under vscode-extension/src/ or vscode-extension/test/, or stryker.config.mjs, are modified

The mutation-testing job now:

  • needs: [build, check-code-changes]
  • Only runs when needs.check-code-changes.outputs.vscode_src_changed == 'true'

Skipped for (examples)

  • JSON data file updates (modelPricing.json, tokenEstimators.json)
  • Documentation / README changes
  • Workflow file changes
  • package.json / lockfile-only changes

Still runs for

  • Any .ts file change under vscode-extension/src/ or vscode-extension/test/
  • stryker.config.mjs changes

Add a check-code-changes job that diffs the PR against the base branch
and sets an output flag when .ts files under vscode-extension/src/ or
vscode-extension/test/, or stryker.config.mjs, are modified.

The mutation-testing job now depends on check-code-changes and only
runs when vscode_src_changed == 'true', skipping it for docs, JSON
data files, workflows, and other non-code changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rajbos rajbos merged commit 08d26c7 into main Apr 18, 2026
19 checks passed
@rajbos rajbos deleted the rajbos/filter-mutation-tests-code-changes branch April 18, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant