Idiomatic monorepo multi-module build strategy?

Written by
Link to Post

https://www.reddit.com/r/golang/comments/aeybur/idiomatic_monorepo_multimodule_build_strategy/

I’m starting a new project/monorepo using modules and I’m looking for thoughts on a build strategy. The current repo has a root go.mod as well as go.mod files in several of the subdirectories. Without incorporating a more in depth tool such as bazel, how would you provide behavior such that commands like ‘go test ./…’ are executed for every directory containing a go.mod file (with the results aggregated into a single return value indicating success/failure). I’ve done some research but haven’t been able to find a way to do it natively with a single ‘go test ./…’ command at the root (as ‘go’ excludes submodules). Is a python script the best approach or is there a more established solution out there that I’m missing?

submitted by /u/dan_m_moore
[link] [comments]

Article Tags:
· ·
Article Categories:
reddit

Leave a Reply