Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
Remove gocov-html as Azure Pipelines auto-generates HTML report
Browse files Browse the repository at this point in the history
  • Loading branch information
radu-matei committed Apr 17, 2019
1 parent 0e5950f commit e87dc5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ HAS_DEP := $(shell $(CHECK) dep)
HAS_GOLANGCI := $(shell $(CHECK) golangci-lint)
HAS_GOIMPORTS := $(shell $(CHECK) goimports)
GOLANGCI_VERSION := v1.16.0
HAS_GOCOV_HTML := $(shell command -v gocov-html;)
HAS_COCOV_XML := $(shell command -v gocov-xml;)
HAS_GOCOV := $(shell command -v gocov;)
HAS_GO_JUNIT_REPORT := $(shell command -v go-junit-report;)
Expand All @@ -99,9 +98,6 @@ ifndef HAS_GOIMPORTS
go get -u golang.org/x/tools/cmd/goimports
endif
dep ensure -vendor-only -v
ifndef HAS_GOCOV_HTML
go get -u github.com/matm/gocov-html
endif
ifndef HAS_COCOV_XML
go get github.com/AlekSi/gocov-xml
endif
Expand All @@ -112,12 +108,11 @@ ifndef HAS_GO_JUNIT_REPORT
go get github.com/jstemmer/go-junit-report
endif

.PHONY: coverage
coverage:
go test -v -coverprofile=coverage.txt -covermode count ./... 2>&1 | go-junit-report > report.xml
gocov convert coverage.txt > coverage.json
gocov-xml < coverage.json > coverage.xml
mkdir coverage
gocov-html < coverage.json > coverage/index.html

.PHONY: goimports
goimports:
Expand Down
3 changes: 1 addition & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ steps:
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)/**/coverage.xml
reportDirectory: $(System.DefaultWorkingDirectory)/**/coverage
summaryFileLocation: $(System.DefaultWorkingDirectory)/**/coverage.xml

0 comments on commit e87dc5a

Please sign in to comment.