2022-10-14 14:28:07 -07:00
|
|
|
include env/testing.env
|
2022-10-14 08:12:30 -07:00
|
|
|
|
|
|
|
.PHONY: dependencies unit-test forge-test integration-test clean all
|
|
|
|
|
|
|
|
all: build
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2023-12-05 08:08:14 -08:00
|
|
|
rm -rf anvil.log node_modules lib out ts/src/ethers-contracts
|
2022-10-14 08:12:30 -07:00
|
|
|
|
|
|
|
.PHONY: dependencies
|
2022-11-10 15:21:32 -08:00
|
|
|
dependencies: node_modules lib/forge-std lib/wormhole
|
2022-10-14 08:12:30 -07:00
|
|
|
|
|
|
|
node_modules:
|
|
|
|
yarn
|
|
|
|
|
|
|
|
lib/forge-std:
|
2022-11-10 15:21:32 -08:00
|
|
|
forge install --no-git --no-commit foundry-rs/forge-std
|
|
|
|
|
|
|
|
lib/wormhole:
|
|
|
|
forge install --no-git --no-commit wormhole=wormhole-foundation/wormhole
|
2022-10-14 08:12:30 -07:00
|
|
|
|
|
|
|
build: dependencies
|
|
|
|
forge build
|
2022-11-10 15:21:32 -08:00
|
|
|
yarn build-types
|
2022-10-14 08:12:30 -07:00
|
|
|
|
|
|
|
.PHONY: unit-test
|
|
|
|
unit-test: forge-test
|
|
|
|
|
|
|
|
.PHONY: forge-test
|
|
|
|
forge-test: dependencies
|
2022-11-10 15:21:32 -08:00
|
|
|
forge test \
|
|
|
|
-vv \
|
|
|
|
--fork-url ${TESTING_FORK_RPC} \
|
|
|
|
|
|
|
|
.PHONY: forge-test
|
|
|
|
gas-report: dependencies
|
|
|
|
forge test \
|
|
|
|
--fork-url ${TESTING_FORK_RPC} \
|
|
|
|
--gas-report
|
2022-10-14 08:12:30 -07:00
|
|
|
|
|
|
|
.PHONY: integration-test
|
|
|
|
integration-test: dependencies build
|
|
|
|
bash shell-scripts/run_integration_tests.sh
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test: forge-test integration-test
|
|
|
|
|