Skip to content

Commit 97e6b6d

Browse files
RafilxTenfenmergify-bot
authored andcommitted
chore: add go tool tip to makefile (#803)
* add go tool tip to makefile * add cover-html command to makefile * add changelog of make cover-html (cherry picked from commit 76102b7)
1 parent 3cdefe8 commit 97e6b6d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
5252
- [782](https://github.com/umee-network/umee/pull/782) Add unit test to `x/oracle/types/denom.go` and `x/oracle/types/keys.go`.
5353
- [786](https://github.com/umee-network/umee/pull/786) Add unit test to `x/oracle/...`.
5454
- [798](https://github.com/umee-network/umee/pull/798) Increase `x/oracle` unit test coverage.
55+
- [803](https://github.com/umee-network/umee/pull/803) Add `cover-html` command to makefile.
5556

5657
## [v2.0.0](https://github.com/umee-network/umee/releases/tag/v2.0.0) - 2022-04-06
5758

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,11 @@ PACKAGES_UNIT=$(shell go list ./... | grep -v -e '/tests/e2e' -e '/tests/simulat
118118
PACKAGES_E2E=$(shell go list ./... | grep '/e2e')
119119
TEST_PACKAGES=./...
120120
TEST_TARGETS := test-unit test-unit-cover test-race test-e2e
121+
TEST_COVERAGE_PROFILE=coverage.txt
121122

122123
test-unit: ARGS=-timeout=10m -tags='norace'
123124
test-unit: TEST_PACKAGES=$(PACKAGES_UNIT)
124-
test-unit-cover: ARGS=-timeout=10m -tags='norace' -coverprofile=coverage.txt -covermode=atomic
125+
test-unit-cover: ARGS=-timeout=10m -tags='norace' -coverprofile=$(TEST_COVERAGE_PROFILE) -covermode=atomic
125126
test-unit-cover: TEST_PACKAGES=$(PACKAGES_UNIT)
126127
test-race: ARGS=-timeout=10m -race
127128
test-race: TEST_PACKAGES=$(PACKAGES_UNIT)
@@ -144,6 +145,11 @@ lint:
144145
@echo "--> Running linter"
145146
@go run github.com/golangci/golangci-lint/cmd/golangci-lint run --timeout=10m
146147

148+
cover-html: test-unit-cover
149+
@echo "--> Opening in the browser"
150+
@go tool cover -html=$(TEST_COVERAGE_PROFILE)
151+
152+
147153
.PHONY: lint
148154

149155
###############################################################################

0 commit comments

Comments
 (0)