Skip to content

Instantly share code, notes, and snippets.

@mitchellh
Created Jan 21, 2019
Embed
What would you like to do?
Makefile target to test all modules in a repo.
.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