Skip to content

Commit

Permalink
add .env creation & unit test make command
Browse files Browse the repository at this point in the history
  • Loading branch information
killroy192 committed Mar 10, 2024
1 parent e0c9813 commit 56b6fbd
Show file tree
Hide file tree
Showing 3 changed files with 379 additions and 514 deletions.
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

0 comments on commit 56b6fbd

Please sign in to comment.