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

ci: Run the ITs against multiple API providers #630

Merged
merged 1 commit into from
Apr 24, 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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: rust-integration-tests
name: rust-integration-tests-alchemy
on:
schedule:
- cron: "0 8,20 * * *"
Expand All @@ -8,7 +8,7 @@ on:
jobs:
integration:
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -19,11 +19,10 @@ jobs:

- name: start beerus RPC on MAINNET
env:
BEERUS_VERSION: "ci"
NETWORK: "mainnet"
ETH_EXECUTION_RPC: ${{ secrets.ETH_EXECUTION_RPC_MAINNET }}
STARKNET_RPC: ${{ secrets.STARKNET_RPC_0_6_0_MAINNET }}
run: ./target/release/beerus & while ! timeout 1 bash -c "echo > /dev/tcp/localhost/3030" 2> /dev/null; do sleep 2; done
STARKNET_RPC: ${{ secrets.STARKNET_RPC_0_6_0_MAINNET_ALCHEMY }}
# Start Beerus, then try to reach the port every second for 60 seconds.
pierre-l marked this conversation as resolved.
Show resolved Hide resolved
run: ./target/release/beerus & for i in {1..60}; do timeout 1 bash -c "echo > /dev/tcp/localhost/3030" 2> /dev/null && break || sleep 1; done

- name: run integration test on MAINNET
run: cargo test --package beerus-rpc --features integration-tests
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/rust-integration-tests-chainstack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: rust-integration-tests-chainstack
on:
schedule:
- cron: "0 8,20 * * *"
workflow_dispatch:

jobs:
integration:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- name: build beerus
run: cargo build -p beerus-cli --release

- name: start beerus RPC on MAINNET
env:
ETH_EXECUTION_RPC: ${{ secrets.ETH_EXECUTION_RPC_MAINNET }}
STARKNET_RPC: ${{ secrets.STARKNET_RPC_0_6_0_MAINNET_CHAINSTACK }}
pierre-l marked this conversation as resolved.
Show resolved Hide resolved
# Start Beerus, then try to reach the port every second for 60 seconds.
run: ./target/release/beerus & for i in {1..60}; do timeout 1 bash -c "echo > /dev/tcp/localhost/3030" 2> /dev/null && break || sleep 1; done

- name: run integration test on MAINNET
run: cargo test --package beerus-rpc --features integration-tests

- name: stop RPC
run: kill $(lsof -t -i:3030)

31 changes: 31 additions & 0 deletions .github/workflows/rust-integration-tests-reddio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: rust-integration-tests-reddio
on:
schedule:
- cron: "0 8,20 * * *"
workflow_dispatch:

jobs:
integration:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- name: build beerus
run: cargo build -p beerus-cli --release

- name: start beerus RPC on MAINNET
env:
ETH_EXECUTION_RPC: ${{ secrets.ETH_EXECUTION_RPC_MAINNET }}
STARKNET_RPC: ${{ secrets.STARKNET_RPC_0_6_0_MAINNET_REDDIO }}
pierre-l marked this conversation as resolved.
Show resolved Hide resolved
# Start Beerus, then try to reach the port every second for 60 seconds.
run: ./target/release/beerus & for i in {1..60}; do timeout 1 bash -c "echo > /dev/tcp/localhost/3030" 2> /dev/null && break || sleep 1; done

- name: run integration test on MAINNET
run: cargo test --package beerus-rpc --features integration-tests

- name: stop RPC
run: kill $(lsof -t -i:3030)

Loading