Skip to content

Commit

Permalink
chore(github): fix tests workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
PierrickGT committed May 17, 2024
1 parent 0c3e149 commit 1631dd7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/test-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ jobs:
- name: Run Forge fork tests
run: yarn fork-run:local
env:
LOCALHOST_RPC_URL: ${{ secrets.LOCALHOST_RPC_URL_FOR_TESTS }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY_FOR_TESTS }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY_FOR_TESTS }}
LOCALHOST_RPC_URL: ${{ secrets.LOCALHOST_RPC_URL }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ jobs:
# make fuzzing semi-deterministic to avoid noisy gas cost estimation
# due to non-deterministic fuzzing (but still use pseudo-random fuzzing seeds)
FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}
PRIVATE_KEY: ${{ secrets.MNEMONIC_FOR_TESTS }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ coverage-summary:

# Deployment helpers
deploy-dry-run:
./set-epochs.sh -p dry-run && forge script script/DeployDryRun.s.sol --skip src --skip test --rpc-url --rpc-url $(SEPOLIA_RPC_URL) --broadcast --slow --verify -vvv
./set-epochs.sh -p dry-run && forge script script/DeployDryRun.s.sol --skip src --skip test --rpc-url $(SEPOLIA_RPC_URL) --broadcast --slow --verify -vvv

deploy-staging:
./set-epochs.sh -p staging && forge script script/DeployDev.s.sol --skip src --skip test --rpc-url --rpc-url $(SEPOLIA_RPC_URL) --broadcast --slow --verify -vvv
./set-epochs.sh -p staging && forge script script/DeployDev.s.sol --skip src --skip test --rpc-url $(SEPOLIA_RPC_URL) --broadcast --slow --verify -vvv

deploy-dev:
./set-epochs.sh -p dev && forge script script/DeployDev.s.sol --skip src --skip test --rpc-url --rpc-url $(SEPOLIA_RPC_URL) --broadcast --slow --verify -vvv
./set-epochs.sh -p dev && forge script script/DeployDev.s.sol --skip src --skip test --rpc-url $(SEPOLIA_RPC_URL) --broadcast --slow --verify -vvv

deploy-production:
./set-epochs.sh -p production && forge script script/DeployProduction.s.sol --skip src --skip test --rpc-url $(MAINNET_RPC_URL) --broadcast --slow --verify -vvv
Expand All @@ -28,7 +28,7 @@ deploy-local:
./set-epochs.sh -p dev && forge script script/DeployDev.s.sol --skip src --skip test --rpc-url $(LOCALHOST_RPC_URL) --broadcast --slow -vvv

deploy-fork:
./set-epochs.sh -p production && forge script script/DeployProduction.s.sol --skip src --skip test --rpc-url localhost --broadcast --slow -vvv
./set-epochs.sh -p production && FOUNDRY_PROFILE=fork forge script script/DeployProduction.s.sol --skip src --skip test --rpc-url $(LOCALHOST_RPC_URL) --broadcast --slow -vvv

# Run slither
slither:
Expand Down
4 changes: 4 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ rpc_storage_caching = { chains = ["mainnet"], endpoints = "all" }
build_info = true
sizes = true

[profile.fork]
block_number = 0
fork_block_number = 0

[profile.default.fuzz]
runs = 5000

Expand Down

0 comments on commit 1631dd7

Please sign in to comment.