Skip to content

Commit 305ba48

Browse files
committed
use rpc test url from env
1 parent 7299960 commit 305ba48

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@ jobs:
3636
cargo pgrx install -p pg_golden_axe --pg-config /tmp/golden-axe-pg-test/install/postgresql-17.2.0-x86_64-unknown-linux-gnu/bin/pg_config
3737
- name: Run tests
3838
run: cargo test
39+
env:
40+
RPC_URL: ${{ secrets.RPC_URL }}

shared/src/jrpc.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ mod tests {
277277

278278
#[test_log::test(tokio::test)]
279279
async fn test_block_and_logs() {
280-
let client = super::Client::new("https://eth.merkle.io/");
280+
let url = std::env::var("RPC_URL").unwrap_or_else(|_| "https://eth.merkle.io/".to_string());
281+
let client = super::Client::new(&url);
282+
println!("{url}");
281283
let n: u64 = 12_911_679;
282284

283285
let b = client.block(format!("0x{:x}", n)).await.unwrap();

0 commit comments

Comments
 (0)