mirror of
https://github.com/genuinetools/reg.git
synced 2024-05-20 12:08:33 -04:00
add coverage to travis
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
ac2e616697
commit
3475db4ba4
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -47,3 +47,7 @@ server/server
|
|||
testreg
|
||||
.certs
|
||||
cross/
|
||||
|
||||
# Go coverage results
|
||||
coverage.txt
|
||||
profile.out
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
- test -z "$(gofmt -s -l . | grep -v vendor | tee /dev/stderr)"
|
||||
- DOCKER_API_VERSION=1.35 make dind dtest
|
||||
- make release
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
|
|
13
Makefile
13
Makefile
|
@ -67,6 +67,17 @@ staticcheck: ## Verifies `staticcheck` passes
|
|||
@echo "+ $@"
|
||||
@staticcheck $(shell go list ./... | grep -v vendor) | grep -v '.pb.go:' | tee /dev/stderr
|
||||
|
||||
.PHONY: cover
|
||||
cover: ## Runs go test with coverage
|
||||
@echo "" > coverage.txt
|
||||
@for d in $(shell go list ./... | grep -v vendor); do \
|
||||
go test -coverprofile=profile.out -covermode=atomic "$d"; \
|
||||
if [ -f profile.out ]; then \
|
||||
cat profile.out >> coverage.txt; \
|
||||
rm profile.out; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
.PHONY: install
|
||||
install: ## Installs the executable or package
|
||||
@echo "+ $@"
|
||||
|
@ -174,7 +185,7 @@ dtest: ## Run the tests in a docker container
|
|||
-e DOCKER_CERT_PATH=/etc/docker/ssl \
|
||||
-e DOCKER_API_VERSION \
|
||||
$(DOCKER_IMAGE) \
|
||||
make test
|
||||
make test cover
|
||||
|
||||
.PHONY: help
|
||||
help:
|
||||
|
|
Loading…
Reference in a new issue