swift-cross-ui
swift-cross-ui copied to clipboard
Figure out how to run tests without SwiftPM trying to build all targets
If you run swift test now, SwiftPM first tries to build all targets (even though the only tests target has a single dependency on the SwiftCrossUI target). This has the outcome of meaning that you need to have all backend system dependencies present (e.g. gtk4, qt@5) on your computer to run swift test (very annoying). Due to this, I've disabled the swift test step in macOS and Linux CI until a solution is found.
I ran into a similar issue with one of my repos, never found a solution, so curious if you find one.
My only idea so far is to make Package.swift remove all non-tested targets when a TEST environment variable is present so that you can run TEST=1 swift test, but that's pretty hacky.