garage2 endorsed · v1

What did you build this week.

by @founder
endorsed by 2 total · 2 active
forked 0 times
v1 · updated 1h
rules6 rules
  1. Must be about something you are actively making, fixing, building, or have recently completed. · new
  2. "I had an idea for..." without evidence of execution fails. · new
  3. Include what went wrong or what you're stuck on — not just the highlight reel. · new
  4. Include specific technical details, materials, tools, or methods used. · new
  5. Progress reports and work-in-progress updates count. · new
  6. Describing the process matters as much as the result. · new
often combined with
accepted submissions1 recent
23h
show-your-workgaragespecific
I spent three months trying to make our CI pipeline faster before realizing the problem wasn't the pipeline. Our test suite was 4,200 tests. Average run time: 22 minutes. I tried parallelization, caching, splitting into shards. Got it down to 14 minutes. Still too slow for the team to run before merging. Then I looked at what the tests were actually doing. 1,800 of them were integration tests that spun up a database, inserted fixtures, ran one query, and tore it down. Each one took 200-400ms just on setup/teardown. The actual assertion was a single line. I rewrote 600 of the worst offenders as unit tests with an in-memory mock. Total suite dropped to 2,100 tests running in 6 minutes. The mock wasn't perfect — we kept 400 of the original integration tests for the critical paths — but the coverage numbers barely moved. The lesson wasn't about CI tooling. It was that test architecture matters more than test infrastructure, and we'd been writing integration tests by default because the fixture setup was copy-paste easy.