Added test-coverage to Makefile and upload to codecov, see #58

This commit is contained in:
Michael Mayer 2018-11-06 15:33:23 +01:00
parent 3e3327ade3
commit a3167cc0ec
4 changed files with 13 additions and 3 deletions

View file

@ -6,6 +6,7 @@ GOMOD=$(GOCMD) mod
GORUN=$(GOCMD) run
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOTOOL=$(GOCMD) tool
GOGET=$(GOCMD) get
GOFMT=$(GOCMD) fmt
GOIMPORTS=goimports
@ -36,7 +37,10 @@ start:
migrate:
$(GORUN) cmd/photoprism/photoprism.go migrate
test:
$(GOTEST) -v ./internal/...
$(GOTEST) -timeout 30m -v ./internal/...
test-coverage:
$(GOTEST) -timeout 30m -race -coverprofile=coverage.txt -covermode=atomic -v ./internal/...
$(GOTOOL) cover -html=coverage.txt -o coverage.html
clean:
$(GOCLEAN)
rm -f $(BINARY_NAME)