Repository navigation
Skip CI tests on pushes that do not change the code of a PR - issue #1748 - #1749
Merged
Merged
Conversation
…1748 The changes job compared the whole PR with main, so that a commit only resolving a CHANGELOG.md conflict (or merging main) reran the full test suite. On a PR update, the PR's own diff on the code paths is now compared between the previous and the new head (git patch-id, against the merge base with main); when it is unchanged and all test jobs passed on the previous head, the test and docker jobs are skipped. Skipped required checks count as passed, hence the check on the previous results. *.md files under the code paths (except docs/) no longer trigger the tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 29, 2026
Skip CI jobs when a pull request does not change the code - issue #42
haddocking/deeprank-gnn-esm#43
Merged
3 tasks done
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.
What does this PR do and why?
The
changesjob compares the whole PR withmain. A commit that only resolves aCHANGELOG.mdconflict after approval, or a merge ofmaininto the branch, therefore reruns the full test suite (about 30 min, six jobs) although the code of the PR did not change.changes: on a PR update (synchronize), compare the PR's own diff on the code paths (src,tests,integration_tests,end-to-end_tests,docs,pyproject.toml,setup.py,Dockerfile) at the previous and the new head, each against its merge base withmain.git patch-idignores line numbers, so mergingmaindoes not count as a change.test-*check runs passed on the previous head, because GitHub treats skipped required checks as passing..mdfiles under the code paths (exceptdocs/) no longer trigger the tests.How was this tested?
The step's script, extracted from the workflow, was run locally with
bash -eo pipefailon the commits of #1745:mainafter a fully tested push: tests skipped;mainafter a push on which no CI ran: tests run;969093bfb): tests run.The workflow itself can only be exercised after merging: this PR does not touch the code paths, so only the
changesjob runs here.AI assistance
Claude Code wrote the workflow change based on my specifications and checked it as described above. I reviewed the changes.
Checklist
CHANGELOG.mdupdated for user-facing changes (not user-facing)Related issues
Closes #1748
Notes for reviewers
maininto a branch, the combination is no longer tested in the PR; it is tested onmainby the scheduled run after the merge.🤖 Generated with Claude Code