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

add .env creation & unit test make command #1

Merged
merged 1 commit into from
Mar 10, 2024
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
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

.PHONY: all test clean install compile snapshot

all: clean install test
all: clean init-env install test

# Clean the repo
clean :; forge clean
clean :; forge clean; rm -rf node_modules; rm .env

init-env :; touch .env;

# Local installation
install :; npm i && npx husky install
Expand All @@ -16,20 +18,31 @@ install-ci :; touch .env; npm ci
# Update Dependencies
forge-update:; forge update

# Compile contracts using hardhat
compile :; npx hardhat compile

# Run integfation & unit tests
test :; forge test -vvv; npx hardhat test

# Run particular unit test
unit :; forge test -vvv --match-contract $(contract)

snapshot :; forge snapshot

format :; forge fmt src/; forge fmt test/

lint :; npx solhint src/**/*.sol

# Run hardhat local network (node)
node :; npx hardhat node

network?=hardhat
task?=help

# Run deploy task based on hardhat.config
deploy :; npx hardhat --network $(network) deploy-bundle

# Execute any available hardhat tast (inclusing custom)
run :; npx hardhat --network $(network) $(task)

-include ${FCT_PLUGIN_PATH}/makefile-external
Loading