Repository navigation
Commit ad598fb
committed
test(verify): the base-reachability pin skips where it cannot be judged (CI shallow checkout)
Run 35380095596 failed the 3.12 and 3.13 matrix on PR #24 while every
other job passed and main was green an hour earlier. The cause is the
new test_protected_file_bases_are_reachable_from_main from 34eb537: it
runs `git merge-base --is-ancestor <base> main`, and CI's actions/checkout
is a depth-1 clone of the PR ref with no `main` at all — there the base is
not even an object ("fatal: Not a valid object name d7f568b").
Reproduced locally in a `--depth 1` clone of the branch: same failure.
The property the test pins — both protected-files bases reachable on
origin — cannot be judged in that checkout, so the test now skips with the
reason when the repository is shallow (`rev-parse --is-shallow-repository`)
or has no `main` ref, and judges it everywhere else. Proved three ways:
passes in the full clone; still fails there with the old 3a4f6b01 restored
("not an ancestor of main"); skips in the shallow clone with
"shallow checkout: the bases' reachability cannot be judged here". Module
27/27; ruff/pyright clean.1 parent fc66514 commit ad598fb
1 file changed
Lines changed: 16 additions & 7 deletions
Lines changed: 16 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
174 | 180 | | |
175 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
176 | 190 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 191 | + | |
183 | 192 | | |
184 | 193 | | |
185 | 194 | | |
| |||
0 commit comments