Skip to content

Commit

Permalink
feat(ct/just): add dummy-deploy
Browse files Browse the repository at this point in the history
Signed-off-by: jsvisa <delweng@gmail.com>
  • Loading branch information
jsvisa committed Oct 10, 2024
1 parent 87a362d commit 179ad7a
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions packages/contracts-bedrock/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ prebuild:
./scripts/checks/check-foundry-install.sh

# Core forge build command
forge-build:
forge-build: dummy-deploy
forge build

# Builds the contracts.
Expand All @@ -32,19 +32,19 @@ build-go-ffi:

# Cleans build artifacts and deployments.
clean:
rm -rf ./artifacts ./forge-artifacts ./cache ./scripts/go-ffi/go-ffi ./deployments/hardhat/*
rm -rf ./artifacts ./forge-artifacts ./cache ./scripts/go-ffi/go-ffi ./deployments/hardhat/* ./test/kontrol/deployments/DeploymentSummary*.sol


########################################################
# TEST #
########################################################

# Runs standard contract tests.
test: build-go-ffi
test: dummy-deploy build-go-ffi
forge test

# Runs standard contract tests with rerun flag.
test-rerun: build-go-ffi
test-rerun: dummy-deploy build-go-ffi
forge test --rerun -vvv

# Run Kontrol tests and build all dependencies.
Expand All @@ -55,11 +55,11 @@ test-kontrol-no-build:
./test/kontrol/scripts/run-kontrol.sh script

# Runs contract coverage.
coverage: build-go-ffi
coverage: dummy-deploy build-go-ffi
forge coverage || (bash -c "forge coverage 2>&1 | grep -q 'Stack too deep' && echo -e '\\033[1;33mWARNING\\033[0m: Coverage failed with stack too deep, so overriding and exiting successfully' && exit 0 || exit 1")

# Runs contract coverage with lcov.
coverage-lcov: build-go-ffi
coverage-lcov: dummy-deploy build-go-ffi
forge coverage --report lcov || (bash -c "forge coverage --report lcov 2>&1 | grep -q 'Stack too deep' && echo -e '\\033[1;33mWARNING\\033[0m: Coverage failed with stack too deep, so overriding and exiting successfully' && exit 0 || exit 1")


Expand All @@ -81,12 +81,16 @@ deploy:
########################################################

# Generates a gas snapshot without building.
gas-snapshot-no-build:
gas-snapshot-no-build: dummy-deploy
forge snapshot --match-contract GasBenchMark

# Generates a gas snapshot.
gas-snapshot: build-go-ffi gas-snapshot-no-build

# Generates a dummy deployment for non-kontrol building and testing.
dummy-deploy:
./test/kontrol/scripts/make-dummy-deployment.sh

# Generates default Kontrol summary.
kontrol-summary:
./test/kontrol/scripts/make-summary-deployment.sh
Expand Down Expand Up @@ -120,7 +124,7 @@ snapshots: build snapshots-no-build
########################################################

# Checks that the gas snapshot is up to date without building.
gas-snapshot-check-no-build:
gas-snapshot-check-no-build: dummy-deploy
forge snapshot --match-contract GasBenchMark --check

# Checks that the gas snapshot is up to date.
Expand Down

0 comments on commit 179ad7a

Please sign in to comment.