mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
15 lines
387 B
Bash
Executable File
15 lines
387 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# source: https://github.com/codecov/example-go
|
|
# go test can't generate code coverage for multiple packages in one command
|
|
|
|
set -e
|
|
echo "" > coverage.txt
|
|
|
|
for d in $(go list ./... | grep -v vendor); do
|
|
go test -race -coverprofile=profile.out -covermode=atomic $d
|
|
if [ -f profile.out ]; then
|
|
cat profile.out >> coverage.txt
|
|
rm profile.out
|
|
fi
|
|
done |