kaocha

vemv 2024-04-09T06:14:05.401369Z

I have a pretty slow test suite. Was wondering if Kaocha can ease parallelizing it at the CI jobs level? e.g. use 4 CI jobs, each runs a given slice of the test suite

DenisMc 2024-04-20T12:20:01.362639Z

One other technique to consider for GHA is to logically split your tests in some other way (e.g. per component or unit/functional or whatever), and run these as separate GHA tasks, in parallel. This is what we do and it works pretty well - we’ve parallelized other chunks of the build as well which has brought the overall time for a prod deployment from 15 minutes to closer to 5.

vemv 2024-04-09T07:03:16.209639Z

Probably it's simple enough to adapt to GHA Thanks!

anssikin 2024-04-09T07:32:04.378479Z

not sure if this helps any, but we did a similar thing (following the same blog post actually) with circleci & kaocha, encapsulated in plugin that is used for parallelizing when running browser tests: https://github.com/CSCfi/rems/blob/b237e3a4d0dcd1f6073a4ff4eba0fcf800238ef7/test/clj/rems/kaocha_circleci.clj definitely had to experiment here and there

vemv 2024-04-09T07:40:02.895519Z

Awesome! Definitely I'll look everywhere I can for inspiration

👍 1
2024-04-09T13:34:39.304099Z

We built this at my job! We thought about open sourcing it but didn’t put in the work. I’ll bring it up when I’m at work on Wednesday

🙏 2
2024-04-09T13:35:00.706819Z

It’s actually pretty simple to build as a hook

lread 2024-04-09T14:03:15.973709Z

It's not kaocha specific and may not answer your question directly, but I have found that a GitHub Actions job matrix can be fed with JSON. So, for some projects, I have a bb task that generates the JSON that defines the jobs to run, and those jobs are, in turn, bb tasks. I have several examples, but https://github.com/clj-commons/rewrite-clj/blob/880563fd751f710e290cc8c7359691b7ae047174/.github/workflows/unit-test.yml#L30-L38. Sometimes, I've had to fiddle with the granularity of jobs; if I have too many jobs, the overall duration will suffer due to GHA job queueing.

❤️ 1
Kirill Chernyshov 2024-04-09T06:48:28.181569Z

This might be helpful. However, this is exclusive for CircleCI https://www.juxt.pro/blog/parallel-kaocha/