Skip to content

Commit

Permalink
test: integration test for Linea
Browse files Browse the repository at this point in the history
  • Loading branch information
xJonathanLEI committed Aug 31, 2024
1 parent 0b5b90c commit 7756c9f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
RPC_1=
RPC_10=
RPC_59144=

# environment variables for prover network
SP1_PROVER=network
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ jobs:
- name: "Set up test fixture"
run: |
git clone https://github.com/succinctlabs/rsp-tests --branch 2024-08-26 --depth 1 ../rsp-tests
git clone https://github.com/succinctlabs/rsp-tests --branch 2024-08-31 --depth 1 ../rsp-tests
cd ../rsp-tests/
docker compose up -d
- name: "Use local test fixture"
run: |
echo "RPC_1=http://localhost:9545/main/evm/1" >> $GITHUB_ENV
echo "RPC_10=http://localhost:9545/main/evm/10" >> $GITHUB_ENV
echo "RPC_59144=http://localhost:9545/main/evm/59144" >> $GITHUB_ENV
- name: "Run tests"
run: |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ End-to-end integration tests are available. To run these tests, utilize the `.en
```bash
export RPC_1="YOUR_ETHEREUM_MAINNET_RPC_URL"
export RPC_10="YOUR_OP_MAINNET_RPC_URL"
export RPC_59144="YOUR_LINEA_MAINNET_RPC_URL"
```

Note that these JSON-RPC nodes must fulfill the [RPC node requirement](#rpc-node-requirement).
Expand Down
9 changes: 7 additions & 2 deletions crates/executor/host/tests/integration.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use alloy_provider::ReqwestProvider;
use rsp_client_executor::{
io::ClientExecutorInput, ChainVariant, ClientExecutor, EthereumVariant, OptimismVariant,
Variant,
io::ClientExecutorInput, ChainVariant, ClientExecutor, EthereumVariant, LineaVariant,
OptimismVariant, Variant,
};
use rsp_host_executor::HostExecutor;
use tracing_subscriber::{
Expand All @@ -19,6 +19,11 @@ async fn test_e2e_optimism() {
run_e2e::<OptimismVariant>(ChainVariant::Optimism, "RPC_10", 122853660).await;
}

#[tokio::test(flavor = "multi_thread")]
async fn test_e2e_linea() {
run_e2e::<LineaVariant>(ChainVariant::Linea, "RPC_59144", 5600000).await;
}

async fn run_e2e<V>(variant: ChainVariant, env_var_key: &str, block_number: u64)
where
V: Variant,
Expand Down

0 comments on commit 7756c9f

Please sign in to comment.