forked from jordaniza/auxo-smart-contract-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (28 loc) · 1.21 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# include .env file and export its env vars
# (-include to ignore error if it does not exist)
-include .env
# env var check
check-env :; echo $(ETHERSCAN_API_KEY)
all: clean install build
# Clean the repo
clean :; forge clean
# Install the Modules
install :; foundryup && forge install
# setup foundry, install node modules and initialize husky
build :; forge build && yarn && yarn prepare
# Allow executable scripts
executable :; chmod +x scripts/*
# create an HTML coverage report in ./report (requires lcov & genhtml)
coverage :; forge coverage --no-match-path "test/fork/**/*.sol" --report lcov && genhtml lcov.info -o report --branch-coverage
# Run the slither container
analyze :; python3 analysis/remappings.py && ./analysis/analyze.sh
# run unit tests (and exclude fork tests)
test-unit :; forge test --no-match-path "test/fork/**/*.sol"
test-unit-gas :; forge test --no-match-path "test/fork/**/*.sol" --gas-report
# run unit tests in watch mode
test-unit-w :; forge test --no-match-path "test/fork/**/*.sol" --watch
# run only fork tests (and exclude unit)
# Note: this can take 10 - 20 minutes the first time you run it
test-fork :; forge test --match-path "test/fork/**/*t.sol"
# run all tests
test :; forge test