Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test optimizations #73

Merged
merged 3 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 44 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,51 @@ on:
pull_request:
workflow_dispatch:

env:
SEPOLIA_RPC: https://ethereum-sepolia-rpc.publicnode.com
MAINNET_RPC: https://cloudflare-eth.com
POLYGON_RPC: wss://polygon.drpc.org
OPTIMISM_RPC: https://mainnet.optimism.io
ARBITRUM_RPC: https://1rpc.io/arb
GNOSIS_RPC: https://gnosis.publicnode.com
BASE_RPC: https://mainnet.base.org
PGN_RPC: https://rpc.publicgoods.network
CELO_RPC: https://forno.celo.org
ETHERSCAN_KEY: HDMPWG86NYEF1Y5KWZU1XI4HZX4SNHFW3B

jobs:
test:
test-fork:
if: github.event.pull_request.head.repo.fork == true && github.event.pull_request.head.repo.private == false
env:
SEPOLIA_RPC: https://ethereum-sepolia-rpc.publicnode.com
MAINNET_RPC: https://cloudflare-eth.com
POLYGON_RPC: wss://polygon.drpc.org
OPTIMISM_RPC: https://mainnet.optimism.io
ARBITRUM_RPC: https://1rpc.io/arb
GNOSIS_RPC: https://gnosis.publicnode.com
BASE_RPC: https://mainnet.base.org
CELO_RPC: https://forno.celo.org
ETHERSCAN_KEY: HDMPWG86NYEF1Y5KWZU1XI4HZX4SNHFW3B
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18.16.1
- name: Set up foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Install
run: yarn install --frozen-lockfile
- name: Check Format
run: yarn prettier . --check
- name: Test
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: yarn test
test-branch:
if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
env:
SEPOLIA_RPC: https://sepolia.infura.io/v3/${{ secrets.INFURA_KEY }}
MAINNET_RPC: https://mainnet.infura.io/v3/${{ secrets.INFURA_KEY }}
POLYGON_RPC: https://polygon-mainnet.infura.io/v3/${{ secrets.INFURA_KEY }}
OPTIMISM_RPC: https://optimism-mainnet.infura.io/v3/${{ secrets.INFURA_KEY }}
ARBITRUM_RPC: https://arbitrum-mainnet.infura.io/v3/${{ secrets.INFURA_KEY }}
GNOSIS_RPC: https://gnosis.publicnode.com
BASE_RPC: https://mainnet.base.org
CELO_RPC: https://forno.celo.org
ETHERSCAN_KEY: ${{ secrets.ETHERSCAN_KEY }}
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion test/arbitrumDeployments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe("Arbitrum deployments", () => {

if (res === undefined || res.length !== module?.parameters.length) {
throw new Error(
"Error: could not read all the module's parameters from the instance",
`Error: could not read all parameters from the instance of module ${module?.name}`,
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/baseDeployments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe("Base deployments", () => {

if (res === undefined || res.length !== module?.parameters.length) {
throw new Error(
"Error: could not read all the module's parameters from the instance",
`Error: could not read all parameters from the instance of module ${module?.name}`,
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/celoDeployments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe("Celo deployments", () => {

if (res === undefined || res.length !== module?.parameters.length) {
throw new Error(
"Error: could not read all the module's parameters from the instance",
`Error: could not read all parameters from the instance of module ${module?.name}`,
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/gnosisDeployments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe("Gnosis deployments", () => {

if (res === undefined || res.length !== module?.parameters.length) {
throw new Error(
"Error: could not read all the module's parameters from the instance",
`Error: could not read all parameters from the instance of module ${module?.name}`,
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/mainnetDeployments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe("Mainnet deployments", () => {

if (res === undefined || res.length !== module?.parameters.length) {
throw new Error(
"Error: could not read all the module's parameters from the instance",
`Error: could not read all parameters from the instance of module ${module?.name}`,
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/optimismDeployments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe("Optimism deployments", () => {

if (res === undefined || res.length !== module?.parameters.length) {
throw new Error(
"Error: could not read all the module's parameters from the instance",
`Error: could not read all parameters from the instance of module ${module?.name}`,
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/polygonDeployments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe("Polygon deployments", () => {

if (res === undefined || res.length !== module?.parameters.length) {
throw new Error(
"Error: could not read all the module's parameters from the instance",
`Error: could not read all parameters from the instance of module ${module?.name}`,
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/schemaValidation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe("Schema Validation Tests", () => {
}, 30000);

test("Test modules ABI", async () => {
const lim = RateLimit(3);
const lim = RateLimit(1);
for (const [id, module] of Object.entries(modules)) {
await lim();
console.log(`module: ${module.name}`);
Expand Down
2 changes: 1 addition & 1 deletion test/sepoliaDeployments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ describe("Sepolia deployments", () => {

if (res === undefined || res.length !== module?.parameters.length) {
throw new Error(
"Error: could not read all the module's parameters from the instance",
`Error: could not read all parameters from the instance of module ${module?.name}`,
);
}
}
Expand Down
Loading