Skip to content

Commit

Permalink
feat: Add API keys (SC-785) (#46)
Browse files Browse the repository at this point in the history
* feat: add api keys

* ci: add test for staging env
  • Loading branch information
lucas-manuel authored Oct 22, 2024
1 parent c752f51 commit 7f8e050
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,25 @@ jobs:
ARBITRUM_NOVA_RPC_URL: ${{secrets.ARBITRUM_NOVA_RPC_URL}}
GNOSIS_CHAIN_RPC_URL: ${{secrets.GNOSIS_CHAIN_RPC_URL}}
BASE_RPC_URL: ${{secrets.BASE_RPC_URL}}
run: FOUNDRY_PROFILE=ci forge test
run: FOUNDRY_PROFILE=ci forge test --nmc DeployEthereumTest

test-ethereum-staging:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

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

- name: Run tests
env:
MAINNET_RPC_URL: ${{secrets.MAINNET_RPC_URL}}
OPTIMISM_RPC_URL: ${{secrets.OPTIMISM_RPC_URL}}
ARBITRUM_ONE_RPC_URL: ${{secrets.ARBITRUM_ONE_RPC_URL}}
ARBITRUM_NOVA_RPC_URL: ${{secrets.ARBITRUM_NOVA_RPC_URL}}
GNOSIS_CHAIN_RPC_URL: ${{secrets.GNOSIS_CHAIN_RPC_URL}}
BASE_RPC_URL: ${{secrets.BASE_RPC_URL}}
run: FOUNDRY_PROFILE=ci forge test --mc DeployEthereumTest

coverage:
runs-on: ubuntu-latest
Expand All @@ -58,7 +76,7 @@ jobs:
ARBITRUM_NOVA_RPC_URL: ${{secrets.ARBITRUM_NOVA_RPC_URL}}
GNOSIS_CHAIN_RPC_URL: ${{secrets.GNOSIS_CHAIN_RPC_URL}}
BASE_RPC_URL: ${{secrets.BASE_RPC_URL}}
run: forge coverage --report summary --report lcov
run: forge coverage --report summary --report lcov --nmc DeployEthereumTest

# To ignore coverage for certain directories modify the paths in this step as needed. The
# below default ignores coverage results for the test and script directories. Alternatively,
Expand Down
8 changes: 8 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,12 @@ fs_permissions = [
[fuzz]
runs = 1000

[etherscan]
mainnet = { key = "${ETHERSCAN_API_KEY}" }
optimism = { key = "${OPTIMISMSCAN_API_KEY}" }
base = { key = "${BASESCAN_API_KEY}" }
gnosis_chain = { key = "${GNOSISSCAN_API_KEY}", url = "https://api.gnosisscan.io/api" }
arbitrum_one = { key = "${ARBISCAN_API_KEY}" }
world_chain = { key = "${WORLD_CHAIN_API_KEY}", chain = 480, url = "https://worldchain-mainnet-explorer.alchemy.com/api" }

# See more config options https://github.com/foundry-rs/foundry/tree/master/config

0 comments on commit 7f8e050

Please sign in to comment.