mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Add cover tasks to test code coverage
This commit is contained in:
parent
8db6f722d2
commit
e60a614a37
8
Makefile
8
Makefile
@ -40,6 +40,14 @@ updatedeps:
|
||||
| sort -u \
|
||||
| xargs go get -f -u -v
|
||||
|
||||
cover:
|
||||
@go tool cover 2>/dev/null; if [ $$? -eq 3 ]; then \
|
||||
go get -u golang.org/x/tools/cmd/cover; \
|
||||
fi
|
||||
go test $(TEST) -coverprofile=coverage.out
|
||||
go tool cover -html=coverage.out
|
||||
rm coverage.out
|
||||
|
||||
# vet runs the Go source code static analysis tool `vet` to find
|
||||
# any common errors.
|
||||
vet:
|
||||
|
Loading…
Reference in New Issue
Block a user