ci: restore incremental test verification (fetch-depth: 0)#238
Merged
Conversation
actions/checkout@v4 defaults to a shallow clone (fetch-depth: 1), which broke oj-verify's timestamp-based change detection (regressed in #234, when checkout went v1 -> v4). Pin fetch-depth: 0 so only changed tests re-run.
500551d to
405104d
Compare
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.
Restores incremental test verification in CI, which regressed in #234.
Root cause
oj-verify(online-judge-verify-helper) only re-runs a test when the file'sgit commit time is newer than the timestamp recorded in
.verify-helper/timestamps.remote.json. That comparison needs the repo's fullgit history.
Before #234 the
library_checker_aizujob usedactions/checkout@v1, whichclones the entire history by default. #234 bumped it to
actions/checkout@v4, whose default is a shallow clone (fetch-depth: 1).With only the HEAD commit present,
git logreports every file as lastmodified at HEAD — newer than every stored timestamp — so
oj-verifyre-runsthe whole suite on every push instead of just the changed files.
Fix
Pin
fetch-depth: 0on that job's checkout sooj-verifysees full historyagain. This matches online-judge-verify-helper's own recommended Actions setup.
Only
library_checker_aizuneeds full history. The other jobs(
update_main,publish_pdf, the compile/lint jobs) don't read git history,so they're left on the default shallow checkout.