Repository navigation
Git test environment consistency - #2152
Closed
elovelan wants to merge 2 commits into
gitpython-developers:main from
elovelan:test_hardening
Closed
Conversation
Copy link
Copy Markdown
Contributor
When implementing #2151 , I ran into a few issues running tests due to:
- By default, GitHub now forks only the default branch when forking a repo. One of the docs tests was relying on
origin/master existing, which is unlikely in a fork scenario, since the common pattern is to set origin to the fork and upstream to the primary repo.
- I have a few "convenience" features in my configuration such as
main as the default repo branch name and fetch.prune=true. These break some of the tests so it seemed like it might be a good idea to always use a consistent config file.
elovelan
added 2 commits
May 12, 2026 16:53
fix(tests): consistent config
d5d86e7
Since there are many ways to configure git, use a standard configuration file,
so tests always run with consistent settings
fix(test_docs): deterministic remote test
38e0f99
The remote test relied on a full repo clone that included all branches, which
isn't guaranteed, especially in CI environments and when using repo forks. Use
the cloned repo instead, since it will still test the desired functionality but
will always have the necessary upstream branch.
Copy link
Copy Markdown
Contributor
Author
|
I'll spin up a Windows VM for testing!
|
Copy link
Copy Markdown
Contributor
Author
|
@Byron , this is actually a little bigger than I had anticipated since there's a bit of config manipulation in the Actions workflows. If you like this approach, I'm happy to bring those settings over but I wanted to check with you first!
|
Copy link
Copy Markdown
Member
|
The test suite unfortunately has never been isolated, and this bites from time to time.
Let's make the changes that are needed on CI to make it more resilient. We just have to watch out that these alterations don't affect local runs.
|
elovelan
marked this pull request as draft
May 14, 2026 16:00
Copy link
Copy Markdown
Contributor
Author
|
Since I need to rethink this, I'm going to close this for now, so it's not noise in the PR list
|
elovelan
closed this
May 18, 2026
Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment
Labels
None yet
2 participants