Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Feb 12, 2025
1 parent ca1d859 commit 251ed6e
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions code/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
install:
.PHONY: help install lint lint-fix integration-tests starknet-tests discovery-tests tests

help: ## Show this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage: make \033[36m\033[0m\n"} /^[$$()% a-zA-Z_-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

install: ## Install the required tools.
npm i @informalsystems/quint -g
cargo install --locked cargo-nextest

lint:
lint: ## Lint the workspace.
cargo fmt --all --check
cargo clippy --workspace --all-features --all-targets -- -D warnings

lint-fix:
lint-fix: ## Fix the linting issues.
cargo clippy --fix --allow-dirty --allow-staged --workspace --all-features --all-targets -- -D warnings
cargo fmt --all

unit-tests:
integration-tests: ## Run the integration tests.
cargo nextest run \
--workspace \
--all-features \
Expand All @@ -19,5 +24,24 @@ unit-tests:
--exclude informalsystems-malachitebft-starknet-test \
--exclude informalsystems-malachitebft-discovery-test

starknet-tests: ## Run the Starknet integration tests
cargo nextest run \
--all-features \
--no-fail-fast \
--failure-output final \
--test-threads 1 \
--package informalsystems-malachitebft-starknet-test

discovery-tests: ## Run the discovery tests
cargo nextest run \
--all-features \
--no-fail-fast \
--failure-output final \
--test-threads 1 \
--package informalsystems-malachitebft-discovery-test

tests: ## Run all the tests.
$(MAKE) integration-tests
$(MAKE) starknet-tests
$(MAKE) discovery-tests

test: unit-tests

0 comments on commit 251ed6e

Please sign in to comment.