diff --git a/.github/workflows/rpc-tests.yml b/.github/workflows/rpc-tests.yml index 778cc6525..14fecb2f1 100644 --- a/.github/workflows/rpc-tests.yml +++ b/.github/workflows/rpc-tests.yml @@ -1,48 +1,49 @@ name: RPC Tests on: - push: - branches: [main, release/**] - pull_request: + push: + branches: [main, release/**] + pull_request: concurrency: - group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }} + cancel-in-progress: true jobs: - test: - name: test RPC - runs-on: ubuntu-22.04 - services: - rpc: - image: stellar/quickstart:testing - ports: - - 8000:8000 - env: - ENABLE_LOGS: true - ENABLE_SOROBAN_DIAGNOSTIC_EVENTS: true - NETWORK: local - PROTOCOL_VERSION: 22 - options: >- - --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" - --health-interval 10s - --health-timeout 5s - --health-retries 50 - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v4 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - run: rustup update - - run: rustup target add wasm32-unknown-unknown - - run: make build-test-wasms - - name: install libudev-dev - run: | - sudo apt install -y libudev-dev - - run: cargo build --features emulator-tests - - run: SOROBAN_PORT=8000 cargo test --features it --features emulator-tests --package soroban-test --test it -- integration + test: + name: test RPC + runs-on: ubuntu-22.04 + services: + rpc: + image: stellar/quickstart:testing + ports: + - 8000:8000 + env: + ENABLE_LOGS: true + ENABLE_SOROBAN_DIAGNOSTIC_EVENTS: true + NETWORK: local + PROTOCOL_VERSION: 22 + options: >- + --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" + --health-interval 10s + --health-timeout 5s + --health-retries 50 + steps: + - uses: actions/checkout@v4 + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - run: rustup update + - run: rustup target add wasm32-unknown-unknown + - run: make build-test-wasms + - name: install libudev-dev + run: | + sudo apt install -y libudev-dev + - run: cargo build --features emulator-tests + - run: SOROBAN_PORT=8000 cargo test --features it --package soroban-test --test it -- integration + - run: SOROBAN_PORT=8000 cargo test --features it --features emulator-tests --package soroban-test --test it -- integration::emulator diff --git a/cmd/crates/soroban-test/tests/it/integration/tx.rs b/cmd/crates/soroban-test/tests/it/integration/tx.rs index 63fc5e8f3..44d5264b0 100644 --- a/cmd/crates/soroban-test/tests/it/integration/tx.rs +++ b/cmd/crates/soroban-test/tests/it/integration/tx.rs @@ -9,11 +9,13 @@ mod operations; #[tokio::test] async fn simulate() { let sandbox = &TestEnv::new(); + let salt = Some(String::from("A")); let xdr_base64_build_only = deploy_contract( sandbox, HELLO_WORLD, DeployOptions { kind: DeployKind::BuildOnly, + salt: salt.clone(), ..Default::default() }, ) @@ -23,6 +25,7 @@ async fn simulate() { HELLO_WORLD, DeployOptions { kind: DeployKind::SimOnly, + salt: salt.clone(), ..Default::default() }, )