Created
January 21, 2019 23:41
-
-
Save mitchellh/978171ebc23243aed0fd4d2828a071d6 to your computer and use it in GitHub Desktop.
Makefile target to test all modules in a repo.
This file contains hidden or 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
.PHONY: test | |
test: | |
@find ${CURRENT_DIR} -type f -name go.mod | xargs -n1 dirname | while read line ; do \ | |
echo $${line} ; \ | |
pushd $${line} >/dev/null ; \ | |
go test ./... ; \ | |
popd >/dev/null ; \ | |
echo ; \ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment