Repository navigation
ci: skip checks and captures for an already-tested tree - #10
Merged
Merged
Conversation
CI now runs on pull requests and on pushes to main only. A gate job looks up a marker artifact keyed by the git tree. A merge whose tree a pull request already tested skips fmt, clippy, and tests. Docs-only changes run nothing. The screenshot workflow keys each capture by a hash of the files that decide the pixels. A source state is captured once, and the pull request report and the main publish step reuse the artifact for that key. Changes outside those files run nothing. Newer pushes cancel the runs they supersede.
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
Stops CI from repeating work it has already done.
ci.yml): each PR commit used to run CI twice, once forpushand once forpull_request. Branch pushes without a PR now run nothing. "Run workflow" still runs on demand.ci-pass-<tree>on success, where<tree>is the tree of the PR's merge commit.screenshots-<key>. The key hashes only the files that decide the pixels.main, a short gate job looks up the key first.mainmoved under the PR: both run in full.nodedb-studio/,Cargo.toml,Cargo.lock, its scripts, or its workflow change.main, cancels the run it supersedes.Notes
main.screenshots, so the first merge after this one recaptures once.Test plan
gatethencheck, and uploadsci-pass-<tree>.key,capture, andreport.mainshowscheckskipped.mainskipscaptureandpublishreuses the PR's artifact.