Last active
March 29, 2018 20:24
-
-
Save arsham/f45f7e7eea7e18796bc1ed5ced9f9f4a to your computer and use it in GitHub Desktop.
Concatinates the test coverages from all folders expect the vendor folder
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
#!/bin/bash | |
echo 'mode: atomic' > coverage.txt | |
go list ./... | grep -v vendor | xargs -n1 -I{} sh -c 'go test -covermode=atomic -coverprofile=coverage.tmp {} | |
tail -n +2 coverage.tmp >> coverage.txt' | |
go tool cover -html=coverage.txt | |
rm coverage.tmp coverage.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or as a function: