Created
July 1, 2020 17:33
-
-
Save ChrisLawther/6eaf81c5a588e0ff33632fb916a4de63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Run in the top directory of an SPM project to have unit tests run every time you save | |
# changes to a .swift file | |
# | |
# Prerequisites: fswatch, available vi `brew install fswatch` | |
# Test stuff now | |
swift test 2>&1 | xcpretty 2>/dev/null | |
# ... and everytime a .swift changes | |
(fswatch -o -e ".*" -i "\\.swift$" . | xargs -n1 -I{} swift test ) 2>&1 | xcpretty 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment