Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Makefile): fix coverage-report target #898

Merged
merged 4 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading