ci: skip mutation tests on PRs with no TS source changes#622
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-changesjob that:vscode_src_changed=trueonly when.tsfiles undervscode-extension/src/orvscode-extension/test/, orstryker.config.mjs, are modifiedThe
mutation-testingjob now:needs: [build, check-code-changes]needs.check-code-changes.outputs.vscode_src_changed == 'true'Skipped for (examples)
modelPricing.json,tokenEstimators.json)package.json/ lockfile-only changesStill runs for
.tsfile change undervscode-extension/src/orvscode-extension/test/stryker.config.mjschanges