mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 02:49:55 +00:00
chore: run tests with coverage in Makefile (#3418)
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@ -35,4 +35,7 @@ dist/
|
||||
db-tools/
|
||||
|
||||
# VSCode
|
||||
.vscode
|
||||
.vscode
|
||||
|
||||
# Coverage report
|
||||
lcov.info
|
||||
|
||||
17
Makefile
17
Makefile
@ -105,6 +105,23 @@ build-release-tarballs: ## Create a series of `.tar.gz` files in the BIN_DIR dir
|
||||
|
||||
##@ Test
|
||||
|
||||
UNIT_TEST_ARGS := --locked --workspace --all-features -E 'kind(lib)' -E 'kind(bin)' -E 'kind(proc-macro)'
|
||||
COV_FILE := lcov.info
|
||||
|
||||
.PHONY: test-unit
|
||||
test-unit: ## Run unit tests.
|
||||
cargo nextest run $(UNIT_TEST_ARGS)
|
||||
|
||||
.PHONY: cov-unit
|
||||
cov-unit: ## Run unit tests with coverage.
|
||||
rm -f $(COV_FILE)
|
||||
cargo llvm-cov nextest --lcov --output-path $(COV_FILE) $(UNIT_TEST_ARGS)
|
||||
|
||||
.PHONY: cov-report-html
|
||||
cov-report-html: cov-unit ## Generate a HTML coverage report and open it in the browser.
|
||||
cargo llvm-cov report --html
|
||||
open target/llvm-cov/html/index.html
|
||||
|
||||
# Downloads and unpacks Ethereum Foundation tests in the `$(EF_TESTS_DIR)` directory.
|
||||
#
|
||||
# Requires `wget` and `tar`
|
||||
|
||||
Reference in New Issue
Block a user