mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-02 01:48:30 +02:00
chore: go support combine all coverage file (#24)
* Combine all coverage file in one command * remove generate-coverage * remove unused method: errCheck Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
14
Makefile
14
Makefile
@ -70,13 +70,6 @@ fmt:
|
||||
vet:
|
||||
$(GO) vet $(PACKAGES)
|
||||
|
||||
.PHONY: errcheck
|
||||
errcheck:
|
||||
@hash errcheck > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||
$(GO) get -u github.com/kisielk/errcheck; \
|
||||
fi
|
||||
errcheck $(PACKAGES)
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
@hash revive > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||
@ -112,13 +105,6 @@ fmt-check:
|
||||
test:
|
||||
GO111MODULE=on $(GO) test -mod=vendor -tags='sqlite sqlite_unlock_notify' $(PACKAGES)
|
||||
|
||||
.PHONY: coverage
|
||||
coverage:
|
||||
@hash gocovmerge > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||
$(GO) get -u github.com/wadey/gocovmerge; \
|
||||
fi
|
||||
gocovmerge $(shell find . -type f -name "coverage.out") > coverage.all;\
|
||||
|
||||
.PHONY: unit-test-coverage
|
||||
unit-test-coverage:
|
||||
$(GO) test -tags='sqlite sqlite_unlock_notify' -cover -coverprofile coverage.out $(PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1
|
||||
|
Reference in New Issue
Block a user