Skip to content

Commit

Permalink
Added post-proposal Alpha tests and Bravo tests (#8)
Browse files Browse the repository at this point in the history
Added tests for Alpha governor after upgrade proposal and proposal actions on Bravo governor.
  • Loading branch information
jferas committed Dec 7, 2023
1 parent dd6c933 commit 07a8dee
Show file tree
Hide file tree
Showing 5 changed files with 578 additions and 11 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
env:
FOUNDRY_PROFILE: ci
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
DEPLOYER_PRIVATE_KEY: ${{ secrets.DEPLOYER_PRIVATE_KEY }}
PROPOSER_PRIVATE_KEY: ${{ secrets.PROPOSER_PRIVATE_KEY }}

jobs:
build:
Expand All @@ -29,10 +31,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 5
submodules: "recursive"

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

# https://twitter.com/PaulRBerg/status/1611116650664796166
- name: Generate fuzz seed with 1 week TTL
run: >
echo "FOUNDRY_FUZZ_SEED=$(
echo $(($EPOCHSECONDS - $EPOCHSECONDS % 604800))
)" >> $GITHUB_ENV
- name: Run tests
run: forge test

Expand All @@ -44,6 +56,13 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

# https://twitter.com/PaulRBerg/status/1611116650664796166
- name: Recycle the fuzz seed from the test run
run: >
echo "FOUNDRY_FUZZ_SEED=$(
echo $(($EPOCHSECONDS - $EPOCHSECONDS % 604800))
)" >> $GITHUB_ENV
- name: Run coverage
run: forge coverage --report summary --report lcov

Expand Down
3 changes: 2 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[profile.default]
evm_version = "paris"
fuzz = { seed = "1" }
optimizer = true
optimizer_runs = 10_000_000
remappings = [
Expand All @@ -10,7 +11,7 @@
verbosity = 3

[profile.ci]
fuzz = { runs = 5000 }
fuzz = { runs = 256 }
invariant = { runs = 1000 }

[profile.lite]
Expand Down
2 changes: 1 addition & 1 deletion test/Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ contract Constants {
address constant TIMELOCK = 0x8dA8f82d2BbDd896822de723F55D6EdF416130ba;

// TODO: resolve the list of large delegates with tallyaddress
address constant PROPOSER = 0x464D78a5C97A2E2E9839C353ee9B6d4204c90B0b;
address constant PROPOSER = 0x464D78a5C97A2E2E9839C353ee9B6d4204c90B0b; // cloudhead.eth

address constant USDC_ADDRESS = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
address constant GTC_ADDRESS = 0xDe30da39c46104798bB5aA3fe8B9e0e1F348163F;
Expand Down
Loading

0 comments on commit 07a8dee

Please sign in to comment.