-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
85 lines (56 loc) · 1.72 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
-include .env
.EXPORT_ALL_VARIABLES:
MAKEFLAGS += --no-print-directory
install:
yarn
foundryup
forge install
contracts:
FOUNDRY_PROFILE=build FOUNDRY_TEST=/dev/null FOUNDRY_SCRIPT=/dev/null forge build --via-ir --extra-output-files irOptimized --sizes --force
test-invariant:
@FOUNDRY_MATCH_CONTRACT=TestInvariant make test
test-integration:
@FOUNDRY_MATCH_CONTRACT=TestIntegration make test
test-internal:
@FOUNDRY_MATCH_CONTRACT=TestInternal make test
test-prod:
@FOUNDRY_MATCH_CONTRACT=TestProd make test
test-unit:
@FOUNDRY_MATCH_CONTRACT=TestUnit make test
test:
forge test -vvv
test-invariant-%:
@FOUNDRY_MATCH_TEST=$* make test-invariant
test-integration-%:
@FOUNDRY_MATCH_TEST=$* make test-integration
test-internal-%:
@FOUNDRY_MATCH_TEST=$* make test-internal
test-prod-%:
@FOUNDRY_MATCH_TEST=$* make test-prod
test-unit-%:
@FOUNDRY_MATCH_TEST=$* make test-unit
test-%:
@FOUNDRY_MATCH_TEST=$* make test
test-invariant/%:
@FOUNDRY_MATCH_CONTRACT=TestInvariant$* make test
test-integration/%:
@FOUNDRY_MATCH_CONTRACT=TestIntegration$* make test
test-internal/%:
@FOUNDRY_MATCH_CONTRACT=TestInternal$* make test
test-prod/%:
@FOUNDRY_MATCH_CONTRACT=TestProd$* make test
test-unit/%:
@FOUNDRY_MATCH_CONTRACT=TestUnit$* make test
test/%:
@FOUNDRY_MATCH_CONTRACT=$* make test
coverage:
forge coverage --report lcov
lcov --remove lcov.info -o lcov.info "test/*"
lcov-html:
@echo Transforming the lcov coverage report into html
genhtml lcov.info -o coverage
gas-report:
@FORGE_GAS_REPORT=true make test-integration
deploy-emode:
FOUNDRY_TEST=/dev/null forge script script/EthEModeDeployScript.sol:EthEModeDeploy --via-ir --broadcast --slow -vvvvv --rpc-url mainnet --ledger
.PHONY: contracts test coverage