I am using a monorepo structure for my server projects, and I would like to test all my packages every time something has changed.
Let's say I have a library called
Lib and a server executable called
Server. Right now I have to build and test the two packages separately. This have some issues:
It would take much longer to build. For instance, my
Libdepends on many communities projects such as SwiftNIO, and my
Serverdepends indirectly on those projects as well. When I have to build for both of them, it means I need to build those community packages for twice.
It means potentially inconsistent package resolution. Right now I have
Servercommitted in the repo, and Xcode automatically deletes
Libwhen I open
Package.swift. So every time I build
Libfor CI, it uses the latest package resolution, which might lead to different behaviors.
Also, in the future, if I have multiple leaf packages (
Serverand its siblings), I would like my local dependencies' tests work correctly with package resolution in all my leaf packages. So in any case, I would like to in all my leaf packages, to run tests for each local dependencies. Though this is not very important.
So, is it possible, when testing for
Server, to also test my dependencies? It would be fine to manually select a list of packages to run tests for, to skip community packages that I am not responsible for. Thanks!