Skip to content

Commit

Permalink
chore(Makefile): fix coverage-report target (#898)
Browse files Browse the repository at this point in the history
* update Makefile

* add coverage html to gitignire
  • Loading branch information
lumtis authored Aug 3, 2023
1 parent 55e440e commit b984dea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
coverage
coverage.json
coverage.out
coverage.html
node_modules
release/
typechain
Expand Down
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ TEST_DIR?="./..."
TEST_BUILD_FLAGS := -tags TESTNET,pebbledb,ledger
PRIV_BUILD_FLAGS := -tags PRIVNET,pebbledb,ledger

clean: clean-binaries clean-dir clean-test-dir
clean: clean-binaries clean-dir clean-test-dir clean-coverage

clean-binaries:
@rm -rf ${GOBIN}/zetacored
Expand All @@ -39,13 +39,18 @@ clean-dir:
all: install

test-coverage-exclude-core:
@go test {TEST_BUILD_FLAGS} -v -coverprofile coverage.out $(go list ./... | grep -v /x/zetacore/)
@go test ${TEST_BUILD_FLAGS} -v -coverprofile coverage.out $(go list ./... | grep -v /x/zetacore/)

test-coverage:
@go test ${TEST_BUILD_FLAGS} -v -coverprofile coverage.out ${TEST_DIR}
-@go test ${TEST_BUILD_FLAGS} -v -coverprofile coverage.out ${TEST_DIR}

coverage-report: test-coverage
@go tool cover -html=cover.txt
@go tool cover -html=coverage.out -o coverage.html

clean-coverage:
@rm -f coverage.out
@rm -f coverage.html

clean-test-dir:
@rm -rf x/crosschain/client/integrationtests/.zetacored
@rm -rf x/crosschain/client/querytests/.zetacored
Expand Down

0 comments on commit b984dea

Please sign in to comment.