Skip to content

Commit 5e14f9f

Browse files
committed
Add testing script (with SPM workaround) and update CONTRIBUTING.md
1 parent ea9c92b commit 5e14f9f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
2. Install the required dependencies as detailed in the [readme](README.md)
77
3. Open Package.swift to open the package in Xcode and you're ready to code, have fun
88

9+
## Running tests
10+
11+
Due to limitations of Swift Package Manager and the way this project is structured, running tests is a little more annoying than just running `swift test`. Luckily, there's a handy [test.sh](test.sh) script which performs the required workaround. To run the tests, just run `./test.sh` in the root of the repository.
12+
913
## How to do something useful
1014

1115
1. Look through [the issues on GitHub](https://github.com/stackotter/swift-cross-ui/issues) and

test.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
# `swift test` builds all targets in the package (even those not depended upon
3+
# by any test targets), which leads to `swift test` on its own being broken
4+
# for SwiftCrossUI
5+
swift test --test-product swift-cross-uiPackageTests

0 commit comments

Comments
 (0)