From f767ec7f849ee013ec4254213c1f9ccb4756820a Mon Sep 17 00:00:00 2001 From: Arya Lanjewar Date: Wed, 5 Mar 2025 16:42:28 +0530 Subject: [PATCH] CI changes to accommodate Anvil --- .github/matic-cli-config.yml | 6 ++++-- .github/workflows/ci.yml | 15 ++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/matic-cli-config.yml b/.github/matic-cli-config.yml index 24f2b29ca6..48ed5f06a9 100644 --- a/.github/matic-cli-config.yml +++ b/.github/matic-cli-config.yml @@ -10,7 +10,8 @@ borDockerBuildContext: '../../bor' heimdallDockerBuildContext: 'https://github.com/maticnetwork/heimdall.git#develop' genesisContractsBranch: master -contractsBranch: mardizzone/node-16 +contractsRepo: https://github.com/0xPolygon/pos-contracts.git +contractsBranch: anvil-pos blockTime: - '2' @@ -32,5 +33,6 @@ numOfErigonValidators: 0 numOfErigonSentries: 0 numOfErigonArchiveNodes: 0 -ethURL: http://ganache:9545 +ethURL: http://anvil:9545 ethHostUser: ubuntu +mnemonic: 'clock radar mass judge dismiss just intact mind resemble fringe diary casino' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c91c8b160b..e3bd28baf5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -228,6 +228,9 @@ jobs: matic-cli/devnet/code/genesis-contracts/package-lock.json matic-cli/devnet/code/genesis-contracts/matic-contracts/package-lock.json + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + - name: Bootstrap devnet run: | cd matic-cli @@ -245,12 +248,14 @@ jobs: - name: Run smoke tests run: | - echo "Funding ganache accounts..." - timeout 10m bash bor/integration-tests/fund_ganache_accounts.sh echo "Deposit 100 matic for each account to bor network" - cd matic-cli/devnet/code/contracts - npm run truffle exec scripts/deposit.js -- --network development $(jq -r .root.tokens.MaticToken contractAddresses.json) 100000000000000000000 - cd - + cd matic-cli/devnet/devnet + SCRIPT_ADDRESS=$(jq -r '.[0].address' signer-dump.json) + SCRIPT_PRIVATE_KEY=$(jq -r '.[0].priv_key' signer-dump.json) + cd ../code/pos-contracts + CONTRACT_ADDRESS=$(jq -r .root.tokens.MaticToken contractAddresses.json) + forge script scripts/matic-cli-scripts/Deposit.s.sol:MaticDeposit --rpc-url http://localhost:9545 --private-key $SCRIPT_PRIVATE_KEY --broadcast --sig "run(address,address,uint256)" $SCRIPT_ADDRESS $CONTRACT_ADDRESS 100000000000000000000 + cd ../../../.. timeout 60m bash bor/integration-tests/smoke_test.sh - name: Run RPC Tests