Skip to content

perf(test): use local git fixtures for tests#5047

Merged
baszalmstra merged 1 commit intoprefix-dev:mainfrom
baszalmstra:optimize-git-conda-tests
Dec 3, 2025
Merged

perf(test): use local git fixtures for tests#5047
baszalmstra merged 1 commit intoprefix-dev:mainfrom
baszalmstra:optimize-git-conda-tests

Conversation

@baszalmstra
Copy link
Contributor

@baszalmstra baszalmstra commented Dec 2, 2025

Description

Optimizes three slow git conda package integration tests by using local git fixtures and the passthrough backend
instead of making network calls to GitHub.

Performance improvements:

Test Before After
add_git_deps ~86s ~2s
add_git_with_specific_commit ~83s ~2s
add_git_with_tag ~92s ~2s

This is a follow-up to #5035 which optimized the git pypi update tests using the same approach.

How Has This Been Tested?

cargo nextest run -p pixi add_git_deps add_git_with_specific_commit add_git_with_tag

All three tests pass in ~2 seconds each.

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: Claude Code

Checklist:

  • I have performed a self-review of my own code
  • I have added sufficient tests to cover my changes.

@baszalmstra baszalmstra changed the title Optimize git conda tests perf(test): use local git fixtures for tests Dec 2, 2025
Copy link
Contributor

@Hofer-Julian Hofer-Julian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Use local git fixture and passthrough backend instead of network calls
to GitHub for add_git_deps, add_git_with_specific_commit, and
add_git_with_tag tests. Reduces test time from ~86-92 seconds to ~2
seconds per test.

- Add conda-build-package fixture with two commits and v0.1.0 tag
- Enhance GitRepoFixture to support tags and main branch
- Add backend_override support to add command for testing
- Fix pretty_url_name to handle Windows file:// URLs properly
- Pass backend_override from PixiControl to AddBuilder automatically
@baszalmstra baszalmstra force-pushed the optimize-git-conda-tests branch from e818c2d to 16a92cc Compare December 3, 2025 14:19
@baszalmstra baszalmstra marked this pull request as ready for review December 3, 2025 14:19
@baszalmstra baszalmstra enabled auto-merge (squash) December 3, 2025 14:19
@baszalmstra baszalmstra merged commit c49445f into prefix-dev:main Dec 3, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants