Repository navigation
Fetch full history in CI and skip frozen-commit tests without it - #1
Merged
Merged
Conversation
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.
Problem
The
testsworkflow has failed on every push tomasterfrom 85ff1e9 onwards (three pushes on 27 Aug 2026: runs 33060297832, 33061204738 and 33062233765). In each run, the Python 3.11 job fails on the same three tests, and fail-fast cancels the 3.12 job:tests/test_osf_deposit.py::test_snapshot_matches_pinned_hashestests/test_osf_deposit.py::test_manifest_points_at_the_freeze_not_headtests/test_osf_deposit.py::test_write_bundle_matches_gitAll three fail at
git show 0a5e794…:PREREGISTRATION.md, which exits with status 128.actions/checkout@v4fetches a single commit by default, so the frozenprereg-v1commit is absent from the CI clone. The other tests pass (117 or 118, depending on the run).Change
.github/workflows/tests.yml:fetch-depth: 0on the checkout step, so that CI has the full history and runs the three tests.tests/test_osf_deposit.py: the three tests that read the frozen commit are markedskipifwhengit cat-file -e 0a5e794…^{commit}fails in the current directory (shallow clone, release zip or tarball without.git, or git not installed). The skip reason names the commit.test_upload_refuses_an_empty_tokendoes not depend on git and is unchanged.src/,PREREGISTRATION.md,configs/prereg_v1.jsonand the pinned hashes inosf_deposit.FROZEN_SHA256are not modified.Checks run locally
Windows, pytest 9.1.1, Python 3.12.11 (numpy 2.5.3, scipy 1.18.1, ripser 0.6.15) and Python 3.11.15 (numpy 2.4.6, scipy 1.17.1, ripser 0.6.15).
pytest -qgit clone --depth 1of this branchpytest -q -rsgit archive --format=zipof this branch, extractedpytest -q -rs tests/test_osf_deposit.pymaster(control)pytest -qon that fileThe workflow itself was not run locally. In CI on this branch (run 37610801711, commit ba71cc1), both
pytest (3.11)andpytest (3.12)report 121 passed and none skipped.With the skip, a checkout that lacks the frozen commit reports three skipped tests instead of three failures. Consequently, if
fetch-depth: 0were removed later, CI would report these skips rather than fail.