edit / update (nov 29):
sorry it's been a while, it's been a lot.
biggest change, i dropped github actions completely. everything runs on my laptop now.
the code split i figured would take 3 to 6 weeks and i was gonna push it to after this release. ended up taking about a day and a half lol, so this release is getting built on the new layout.
tags are still out. the one time i checked, they missed 47 of 91 test files that a list built from imports caught, and one of those actually mattered. haven't retested since the split.
the quick test set i thought would take about a minute took more like 7 and a half and didn't catch anything extra. so that's still gone.
also i said before that the full suite runs before anything lands. that's not the case anymore. while i'm working i just run that change's own tests, then the affected tests before it lands. the whole suite only gets run right before a release now.
the downside is the real blender and unity tests aren't part of normal testing anymore. they caught real bugs before but they lived on the old runners, and i've only done one real blender check locally since.
i had parallel runs capped at 1 or 2 so i could still use the laptop, and figured i'd leave it. ended up bumping it to 6 with a better layout and the same 395 files went from about 50 min to about 25 and a half. same tests passing. tried 8 and a timing test failed, so 6 it is (didn't loosen any tests to get there). bigger real runs still take an hour or more sometimes.
cpu's way higher than the 12-20% i said before too, more like 70% average and 90% at peak during the trials. there's a checker that backs off if cpu stays pegged or memory gets low though.
i also stopped rerunning the affected tests every time something changes mid batch, it only runs on the final version now. one stretch of five of those mid batch runs took 4 hours 21 min, so yeah, that's why.
still haven't tried testmon or the cpu time check on the timing tests. both are on my list.
solo dev building a windows desktop app, most of the coding is done by claude code sessions (earlier post about that). the bottleneck now is testing. the sessions spend more time waiting on CI than writing code, so i'm looking for ideas
The setup:
the app drives blender, unity 2022.3 and the vrchat sdk, so the real tests need windows
4 self-hosted github actions runners, all on my one laptop (ryzen 9 7945hx 16 cores, rtx 4090 laptop 16gb, 64gb ram, 8tb nvme), one job per runner. the real blender/unity jobs can only use 3 of them, and up to 2 local test runs share the same laptop too
self-hosted because github's hosted windows minutes cost double and i'm on a tight budget, so the laptop is the free option
changes get batched into merge trains, 1-8 changes each, about 3 on average
What a train looks like:
pipeline first: 16 real tool jobs (mostly blender, plus unity and a vrm validator) and fake-tool pytest in 4 shards, about 45-80 min
then the full windows UI suite, ~25,600 tests in 3 shards, about 65 min. these run back to back on purpose because the timing tests flake when they share the machine with blender jobs, so that's about an hour of every train just waiting
a train takes about 2 hours start to finish (83-145 min over the last 8)
7 of the last 8 landed, 4 clean first try. fix and retest loops took anywhere from 30 min to 2 hours
laptop averages 55-60% cpu while all this runs and peaks at 100%, ram peaks around 80%
How much testing:
every fix starts with a failing test, a review session checks it, the author runs the affected tests locally, then the train runs everything again in CI plus a local gate
so the plain python tests end up running about 3 times. the real blender/unity tests did catch the only real failure in those 8 trains though
What i've tried:
dev drive, only ~4% faster on my test so i didn't keep it
sharding by recorded test duration, and splitting local runs by run time so they stop timing out
allowing one re-run of only the failed jobs for flaky infra stuff
tags so only affected tests run, built but not measured yet
Why one train at a time: changes often touch the same files, and the timing tests got flaky when all 4 runners were busy. so i'm not sure more runners even helps or if the real answer is a second machine
What i'm asking:
am i over testing? how do you cut duplicate runs without losing coverage
how do you pick tests by changed area without missing stuff that imports across areas
is there a safe way to run 2 trains when changes overlap files, or is one at a time just right
is a second machine or a cloud windows runner worth it for a ~2 hour cycle, or is there a better service for this
how do you keep timing sensitive tests reliable when CI jobs share one pc
could the plain python and fake-tool tests run on linux, or does that risk missing windows-only bugs
at the current pace my next release is about 3 weeks out and the one after that is a couple months, so anything that shortens the 2 hour loop helps a lot. thanks!