Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out how to run tests without SwiftPM trying to build all targets #80

Open
stackotter opened this issue Apr 7, 2024 · 2 comments
Labels
bug Something isn't working CI

Comments

@stackotter
Copy link
Owner

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.

@stackotter stackotter added bug Something isn't working CI labels Apr 7, 2024
@lhoward
Copy link

lhoward commented Apr 7, 2024

I ran into a similar issue with one of my repos, never found a solution, so curious if you find one.

@stackotter
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI
Projects
None yet
Development

No branches or pull requests

2 participants