mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-22 16:57:45 -06:00
Reduce the work Go tests spend on fixture setup, without dropping any test or covered code. Every fixture repository reset listed and stat'ed both trees, and many packages copied repositories or created a database they never use. - List the fixture repository source tree once per process - Skip the repository copy in DB-only packages and the database in settings-only packages - Drop the unused repository copy and git init from migration tests - Push LFS files last in `TestGitGeneral`, so LFS hooks don't run on every later git command - Link the integration test binary without DWARF Measured locally on macOS, wall and CPU time: | | Before | After | |---|---|---| | Warm fixture repository reset | 127 ms | 63 ms | | 30 affected unit packages | 13.6 s, 72 s CPU | 10.0 s, 51 s CPU | | Migration tests | 29.9 s, 19.1 s CPU | 13.7 s, 8.8 s CPU | | `TestGitGeneral` | 81 s, 69 s CPU | 62 s, 54 s CPU | | 46 API integration tests | 41.7 s | 39.0 s | | Integration test binary relink | 8.7 s, 11.6 s CPU | 3.7 s, 5.7 s CPU | Assisted-by: Claude Code:claude-opus-5-5